Browser

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

Usage example

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

Properties

Property Type Description
ie Boolean true for all Internet Explorer versions (not Edge).
ielt9 Boolean true for Internet Explorer versions less than 9.
edge Boolean true for the Edge web browser.
webkit Boolean true for webkit-based browsers like Chrome and Safari (including mobile versions).
gecko Boolean true for gecko-based browsers like Firefox.
android Boolean true for any browser running on an Android platform.
android23 Boolean true for browsers running on Android 2 or Android 3.
chrome Boolean true for the Chrome browser.
safari Boolean true for the Safari browser.
win Boolean true when the browser is running in a Windows platform
ie3d Boolean true for all Internet Explorer versions supporting CSS transforms.
webkit3d Boolean true for webkit-based browsers supporting CSS transforms.
gecko3d Boolean true for gecko-based browsers supporting CSS transforms.
opera12 Boolean true for the Opera browser supporting CSS transforms (version 12 or later).
any3d Boolean true for all browsers supporting CSS transforms.
mobile Boolean true for all browsers running in a mobile device.
mobileWebkit Boolean true for all webkit-based browsers in a mobile device.
mobileWebkit3d Boolean true for all webkit-based browsers in a mobile device supporting CSS transforms.
mobileOpera Boolean true for the Opera browser in a mobile device.
mobileGecko Boolean true for gecko-based browsers running in a mobile device.
touch Boolean true for all browsers supporting touch events.
msPointer Boolean true for browsers implementing the Microsoft touch events model (notably IE10).
pointer Boolean true for all browsers supporting pointer events.
retina Boolean true for browsers on a high-resolution "retina" screen.
canvas Boolean true when the browser supports <canvas>.
vml Boolean true if the browser supports VML.
svg Boolean true when the browser supports SVG.
v1.1.0
Props Wrld.Prop
Themes Wrld.themes
Heatmaps Wrld.Heatmap
Events Event objects
Services (Optional) WrldPoiApi