Leaflet Map Browser—具有静态属性的命名空间,用于Leaflet内部使用的浏览器/功能检测

Leaflet Map Browser—具有静态属性的命名空间,用于Leaflet内部使用的浏览器/功能检测


A namespace with static properties for browser/feature detection used by Leaflet internally.

具有静态属性的命名空间,用于Leaflet内部使用的浏览器/功能检测

Usage example

if (L.Browser.ielt9) {
alert('Upgrade your browser, dude!');
}




Properties

PropertyTypeDescription
ieBooleantrue for all Internet Explorer versions (not Edge).
适用于所有Internet Explorer版本(非Edge)。
ielt9Booleantrue for Internet Explorer versions less than 9.
对于小于9的Internet Explorer版本。
edgeBooleantrue for the Edge web browser.
用于Edge web浏览器。
webkitBoolean;true for webkit-based browsers like Chrome and Safari (including mobile versions).
适用于基于webkit的浏览器,如Chrome和Safari(包括移动版本)。
androidBooleanDeprecated. true for any browser running on an Android platform.
已弃用。适用于在Android平台上运行的任何浏览器。
android23BooleanDeprecated. true for browsers running on Android 2 or Android 3.
已弃用。适用于运行在Android 2或Android 3上的浏览器。
androidStockBooleanDeprecated. true for the Android stock browser (i.e. not Chrome)
已弃用。适用于Android股票浏览器(即非Chrome)
operaBooleantrue for the Opera browser
用于Opera浏览器
chromeBooleantrue for the Chrome browser.
对于Chrome浏览器。
geckoBooleantrue for gecko-based browsers like Firefox.
适用于Firefox等基于壁虎的浏览器。
safariBooleantrue for the Safari browser.
Safari浏览器。
opera12Booleantrue for the Opera browser supporting CSS transforms (version 12 or later).
支持CSS转换的Opera浏览器(版本12或更高版本)。
winBooleantrue when the browser is running in a Windows platform
当浏览器在Windows平台上运行时
ie3dBooleantrue for all Internet Explorer versions supporting CSS transforms.
所有支持CSS转换的Internet Explorer版本。
webkit3dBooleantrue for webkit-based browsers supporting CSS transforms.
用于支持CSS转换的基于webkit的浏览器。
gecko3dBooleantrue for gecko-based browsers supporting CSS transforms.
用于支持CSS转换的基于gecko的浏览器。
any3dBooleantrue for all browsers supporting CSS transforms.
适用于所有支持CSS转换的浏览器。
mobileBooleantrue for all browsers running in a mobile device.
适用于移动设备中运行的所有浏览器。
mobileWebkitBooleantrue for all webkit-based browsers in a mobile device.
用于移动设备中所有基于webkit的浏览器。
mobileWebkit3dBooleantrue for all webkit-based browsers in a mobile device supporting CSS transforms.
用于支持CSS转换的移动设备中所有基于webkit的浏览器。
msPointerBooleantrue for browsers implementing the Microsoft touch events model (notably IE10).
用于实现Microsoft触摸事件模型(特别是IE10)的浏览器。
pointerBooleantrue for all browsers supporting pointer events.
适用于所有支持指针事件的浏览器。
touchNativeBooleantrue for all browsers supporting touch eventsThis does not necessarily mean that the browser is running in a computer with a touchscreen, it only means that the browser is capable of understanding touch events.
适用于所有支持触摸事件的浏览器。这并不一定意味着浏览器在带有触摸屏的计算机上运行,它只意味着浏览器能够理解触摸事件。
touchBooleantrue for all browsers supporting either touch or pointer events. Note: pointer events will be preferred (if available), and processed for all touch* listeners.
适用于所有支持触摸或指针事件的浏览器。注意:将首选指针事件(如果可用),并为所有touch*侦听器处理指针事件。
mobileOperaBooleantrue for the Opera browser in a mobile device.
用于移动设备中的Opera浏览器。
mobileGeckoBooleantrue for gecko-based browsers running in a mobile device.
用于移动设备中运行的基于gecko的浏览器。
retinaBooleantrue for browsers on a high-resolution “retina” screen or on any screen when browser’s display zoom is more than 100%.
对于高分辨率“视网膜”屏幕上的浏览器,或当浏览器的显示缩放超过100%时的任何屏幕。
passiveEventsBooleantrue for browsers that support passive events.
用于支持被动事件的浏览器。
canvasBooleantrue when the browser supports <canvas>.
当浏览器支持<canvas>时。
svgBooleantrue when the browser supports SVG.
当浏览器支持SVG时。
vmlBooleantrue if the browser supports VML.
如果浏览器支持VML。
macBooleantrue when the browser is running in a Mac platform true when the browser is running in a Linux platform
当浏览器在Mac平台上运行时,true当浏览器在Linux平台上运行





5 1 投票
文章评分
订阅评论
提醒
0 评论
内联反馈
查看所有评论
0
希望看到您的想法,请您发表评论x