Browser
是浏览器代理类。封装浏览器及原生 js 提供的一些功能。
clientHeight:Number
[read-only]
浏览器窗口可视高度。
通过分析浏览器信息获得。浏览器多个属性值优先级为:window.innerHeight(包含滚动条高度) > document.body.clientHeight(不包含滚动条高度) > document.documentElement.clientHeight(不包含滚动条高度),如果前者为0或为空,则选择后者。
Implementation
public static function get clientHeight():Number
clientWidth:Number
[read-only]
浏览器窗口可视宽度。
通过分析浏览器信息获得。浏览器多个属性值优先级为:window.innerWidth(包含滚动条宽度) > document.body.clientWidth(不包含滚动条宽度),如果前者为0或为空,则选择后者。
Implementation
public static function get clientWidth():Number
container:*
画布容器,用来盛放画布的容器。方便对画布进行控制
Implementation
public static function get container():*
public static function set container(value:any):void
public static var context:Context
全局画布上绘图的环境(非主画布)。
document:*
[read-only]
浏览器原生 document 对象的引用。
Implementation
public static function get document():*
height:Number
[read-only]
浏览器窗口物理高度。考虑了设备像素比。
Implementation
public static function get height():Number
public static var httpProtocol:Boolean
表示是否是 HTTP 协议。
public static var onAndriod:Boolean
表示是否在 Android设备。
public static var onAndroid:Boolean
表示是否在 Android设备。
public static var onEdge:Boolean
表示是否在Edge。
public static var onFirefox:Boolean
表示是否在Firefox。
public static var onIE:Boolean
表示是否在IE浏览器内
public static var onIOS:Boolean
表示是否在 ios 设备。
public static var onIPad:Boolean
表示是否在 ipad 设备。
public static var onIPhone:Boolean
表示是否在 iphone设备。
public static var onMobile:Boolean
表示是否在移动设备。
public static var onMQQBrowser:Boolean
表示是否在移动端 QQ 或 QQ 浏览器。
public static var onPC:Boolean
表示是否在 PC 端。
public static var onQQBrowser:Boolean
表示是否在 QQ 浏览器。
public static var onSafari:Boolean
表示是否在移动端 Safari。
public static var onWeiXin:Boolean
微信内
public static var onWP:Boolean
表示是否在 Windows Phone 设备。
pixelRatio:Number
[read-only]
设备像素比。
Implementation
public static function get pixelRatio():Number
public static var userAgent:String
浏览器代理信息。
width:Number
[read-only]
浏览器窗口物理宽度。考虑了设备像素比。
Implementation
public static function get width():Number
window:*
[read-only]
浏览器原生 window 对象的引用。
Implementation
public static function get window():*
public static function createElement(type:String):*
创建浏览器原生节点。
Parameters
Returns
public static function getElementById(type:String):*
返回 Document 对象中拥有指定 id 的第一个对象的引用。
Parameters
Returns