DomApi
Value members
Concrete methods
- Returns:
hierarchical path describing the position and identity of this node, starting with the root.
Returns js.undefined when the property is missing on the element.
If the element type supports this property, it should never be js.undefined.
Returns js.undefined when the property is missing on the element.
If the element type supports this property, it should never be js.undefined.
Note: this only gets inline style values – those set via the style attribute, which includes
all style props set by Laminar. It does not account for CSS declarations in <style> tags.
Note: this only gets inline style values – those set via the style attribute, which includes
all style props set by Laminar. It does not account for CSS declarations in <style> tags.
Returns empty string if the given style property is not defined in this element's inline styles.
See https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/getPropertyValue Contrast with https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle
#WARNING: Only use on trusted HTML strings. HTML strings can contain embedded Javascript code, which this function will execute blindly!
#WARNING: Only use on trusted HTML strings. HTML strings can contain embedded Javascript code, which this function will execute blindly!
Note: this expects the html string to contain one HTML element, and will throw otherwise (e.g. if given a text node, an SVG, or multiple elements)
#WARNING: Only use on trusted HTML strings. HTML strings can contain embedded Javascript code, which this function will execute blindly!
#WARNING: Only use on trusted HTML strings. HTML strings can contain embedded Javascript code, which this function will execute blindly!
Note: this expects the html string to contain one element matching the tag name, and will throw otherwise (e.g. if given a text node, an element with a different tag name, or multiple elements)
#WARNING: Only use on trusted HTML strings. HTML strings can contain embedded Javascript code, which this function will execute blindly!
#WARNING: Only use on trusted HTML strings. HTML strings can contain embedded Javascript code, which this function will execute blindly!
Note: This method does not work in Internet Explorer. See https://stackoverflow.com/q/10585029 for the issues with various approaches. Use this if you need IE support: https://gist.github.com/Munawwar/6e6362dbdf77c7865a99
#WARNING: Only use on trusted SVG strings. SVG strings can contain embedded Javascript code, which this function will execute blindly!
#WARNING: Only use on trusted SVG strings. SVG strings can contain embedded Javascript code, which this function will execute blindly!
Note: this expects the svg string to contain one HTML element, and will throw otherwise (e.g. if given a text node, HTML, or multiple elements)
#WARNING: Only use on trusted SVG strings. SVG strings can contain embedded Javascript code, which this function will execute blindly!
#WARNING: Only use on trusted SVG strings. SVG strings can contain embedded Javascript code, which this function will execute blindly!
Note: this expects the svg string to contain one element matching the tag name, and will throw otherwise (e.g. if given a text node, an element with a different tag name, or multiple elements)