-
Notifications
You must be signed in to change notification settings - Fork 0
Checking User Agent
bapquad edited this page Feb 20, 2022
·
3 revisions
[Home] > Checking User Agent
This content we learn how to check the user's browser and user's device in Element5JS API.
You can investigate your browser that which is type such that Google Chrome, Safari or Microsoft Edge, etc...
import {bom5} from '@bapquad/element5'
if(bom5.Browser.IsOpera)
{
$("#wrapper").add($.create("p").text("Your browser is Opera").css("color", "green"));
}
else
{
$("#wrapper").add($.create("p").text("Your browser isn't Opera"));
}
You can investigate your device that which is operation, mobile or tablet, ect...
import {bom5} from '@bapquad/element5'
if(bom5.Device.IsAndroid)
{
$("#wrapper").add($.create("p").text("Device is Android").css("color", "green"));
}
else
{
$("#wrapper").add($.create("p").text("Device isn't Android"));
}
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