Core. Browser

new Browser()

Member

(static) canvas :HTMLCanvas

Global canvas instance (non main canvas).

(static) clientHeight :Number

Browser window visual height. Access to information through browser analysis. The browser multiple attribute value priority: window.innerHeight (including scroll height) > document.body.clientHeight (not including the scroll bar height) > document.documentElement.clientHeight (not including the scroll bar height), if the former is 0 or empty, then choose the latter.

(static) clientWidth :Number

Browser window visual width. Access to information through browser analysis. Multiple attribute values for browsers are: window.innerWidth (including scroll bar width) > document.body.clientWidth (excluding scroll bar width), and if the former is 0 or null, then select the latter.

(static) container :Object

A container for holding canvases. Easy to control canvas

(static) context :Context

The environment for drawing on a global canvas (non main canvas).

(static) document :Object

Browser native document object reference.

(static) height :Number

Browser window physical height. The device pixel ratio is considered.

(static) httpProtocol :Boolean

Indicates whether it is a HTTP protocol.

(static) onAndriod :Boolean

Indicates whether it is in the Android device.

(static) onAndroid :Boolean

Indicates whether it is in the Android device.

(static) onIE :Boolean

Indicates whether it is in the IE browser

(static) onIOS :Boolean

Indicates whether it is in the IOS device.

(static) onIPad :Boolean

Indicates whether it is in the iPad device.

(static) onIPhone :Boolean

Indicates whether it is in the iPhone device.

(static) onMobile :Boolean

Indicates whether it is in the mobile device.

(static) onMQQBrowser :Boolean

Indicates whether it is in the mobile terminal, QQ, or QQ browser.

(static) onPC :Boolean

Indicates whether it is on the PC side.

(static) onQQBrowser :Boolean

Indicates whether it is in the QQ browser.

(static) onSafari :Boolean

Indicates whether the Safari is at the mobile terminal.

(static) onWeiXin :Boolean

WeChat

(static) onWP :Boolean

Indicates whether it is in the Windows Phone device.

(static) pixelRatio :Number

Device pixel ratio.

(static) userAgent :String

Browser proxy information.

(static) width :Number

Browser window physical width. The device pixel ratio is considered.

(static) window :Object

Browser native window object reference.

Methods

createElement(type) → {Object}

Creating browser native nodes.
Parameters:
Name Type Description
type String Node type.
Returns:
Type:
Object
A reference to the created node object.

getElementById(type) → {Object}

Returns a reference to the first object with the specified Document in the ID object.
Parameters:
Name Type Description
type String Node ID.
Returns:
Type:
Object
Node object.

now()

Gets the current timestamp of the browser, in milliseconds.

removeElement(type)

Removes the specified browser native node object.
Parameters:
Name Type Description
type Object Node object.