DomUtil
Utility functions to work with the DOM tree, used by Leaflet internally.
Most functions expecting or returning a HTMLElement also work for SVG elements. The only difference is that classes refer to CSS classes in HTML and SVG classes in SVG.
Properties
Functions
Creates an HTML element with tagName
, sets its class to className
, and optionally appends it to container
element.
Get Element by its ID
Get Element by the given HTML-Element
Returns the coordinates of an element previously positioned with setPosition.
Returns the value for a certain style attribute on an element, including computed values or values set through CSS.
Makes the outline of the element el
invisible. Used internally by Leaflet to prevent focusable elements from displaying an outline when the user performs a drag interaction on them.
Cancels the effects of a previous preventOutline.
Sets the position of el to coordinates specified by position, using CSS translate or top/left positioning depending on the browser (used by Leaflet internally to position its layers).