-
Notifications
You must be signed in to change notification settings - Fork 0
API Cheat Sheet [bom5]
Manipulating with BOM elements.
For using this module, we need to import the bom5
module into your application. Like as following line.
import {bom5} from '@bapquad/element5'
Manages the browser model.
Receives the boolean value tests whether the browser is firefox or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Browser.IsFirefox)
{
console.log("The browser is Firefox");
}
else
{
console.log("The browser isn't Firefox");
}
Receives the boolean value tests whether the browser is opera or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Browser.IsOpera)
{
console.log("The browser is Opera");
}
else
{
console.log("The browser isn't Opera");
}
Receives the boolean value tests whether the browser is Safari or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Browser.IsSafari)
{
console.log("The browser is Safari");
}
else
{
console.log("The browser isn't Safari");
}
Receives the boolean value tests whether the browser is Internet Explorer or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Browser.IsIE)
{
console.log("The browser is Internet Explorer");
}
else
{
console.log("The browser isn't Internet Explorer");
}
Receives the boolean value tests whether the browser is Microsoft Edge or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Browser.IsEdge)
{
console.log("The browser is Microsoft Edge");
}
else
{
console.log("The browser isn't Microsoft Edge");
}
Receives the boolean value tests whether the browser is Google Chrome or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Browser.IsChrome)
{
console.log("The browser is Google Chrome");
}
else
{
console.log("The browser isn't Google Chrome");
}
Receives the boolean value tests whether the browser is blink browser or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Browser.IsBlink)
{
console.log("The browser is blink browser");
}
else
{
console.log("The browser isn't blink browser");
}
Receives the boolean value tests whether the browser is Opera Mini or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Browser.IsOperaMini)
{
console.log("The browser is Opera Mini");
}
else
{
console.log("The browser isn't Opera Mini");
}
Manages the device model.
Receives the boolean value tests whether the device is Microsoft Windows or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Device.IsWin)
{
console.log("The device is Microsoft Windows");
}
else
{
console.log("The device isn't Microsoft Windows");
}
Receives the boolean value tests whether the device is Apple Mac or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Device.IsMac)
{
console.log("The device is Apple Mac device");
}
else
{
console.log("The device isn't Apple Mac device");
}
Receives the boolean value tests whether the device is Unix operation system or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Device.IsUnix)
{
console.log("The device is Unix operation system");
}
else
{
console.log("The device isn't Unix operation system");
}
Receives the boolean value tests whether the device is Linux or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Device.IsLinux)
{
console.log("The device is Linux");
}
else
{
console.log("The device isn't Linux");
}
Receives the boolean value tests whether the device is 64-bits architecture or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Device.Is64BitsArch)
{
console.log("The device is 64-bits architecture");
}
else
{
console.log("The device isn't 64-bits architecture");
}
Receives the boolean value tests whether the device is 32-bits architecture or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Device.Is32BitsArch)
{
console.log("The device is 32-bits architecture");
}
else
{
console.log("The device isn't 32-bits architecture");
}
Receives the boolean value tests whether the device is Android or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Device.IsAndroid)
{
console.log("The device is Android");
}
else
{
console.log("The device isn't Android");
}
Receives the boolean value tests whether the device is iOS or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Device.IsiOS)
{
console.log("The device is iOS");
}
else
{
console.log("The device isn't iOS");
}
Receives the boolean value tests whether the device is Windows Phone or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Device.IsWP)
{
console.log("The device is Windows Phone");
}
else
{
console.log("The device isn't Windows Phone");
}
Receives the boolean value tests whether the device is BlackBerry or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Device.IsBlackBerry)
{
console.log("The device is BlackBerry");
}
else
{
console.log("The device isn't BlackBerry");
}
Receives the boolean value tests whether the device is iPhone or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Device.IsiPhone)
{
console.log("The device is iPhone");
}
else
{
console.log("The device isn't iPhone");
}
Receives the boolean value tests whether the device is iPad or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Device.IsiPad)
{
console.log("The device is iPad");
}
else
{
console.log("The device isn't iPad");
}
Receives the boolean value tests whether the device is iPod or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Device.IsiPod)
{
console.log("The device is iPod");
}
else
{
console.log("The device isn't is iPod");
}
Receives the boolean value tests whether the device is isWebOS or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Device.IsWebOS)
{
console.log("The device is webOS");
}
else
{
console.log("The device isn't webOS");
}
Receives the boolean value tests whether the device is tablet or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Device.IsTablet)
{
console.log("The device is tablet");
}
else
{
console.log("The device isn't tablet");
}
Receives the boolean value tests whether the device is mobile or not.
Value
A Boolean value.
Example
import {bom5} from '@bapquad/element5'
if(bom5.Device.IsMobile)
{
console.log("The device is mobile");
}
else
{
console.log("The device isn't mobile");
}
Bapquad Games since 2015
- Get Started
- Working with DOM
- Constructing the StyleSheet
- Working with Sprite
- Working with Timeline
- Working with Scroller
- Working with Camera
- Working with Microphone
- Making the Ajax Request
- Opening a Websocket
- Working with Storage
- Checking User Agent
- Working with GPS
- Working with Router
- Playing the Stream