object DomApi
- Alphabetic
- By Inheritance
- DomApi
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addEventListener[Ev <: Event](element: Base, listener: EventListener[Ev, _]): Unit
Events
- def appendChild(parent: Base, child: Base): Boolean
Tree functions
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def assertHtmlElement(node: Node, clue: String = "Error"): Element
- def assertSingleNode(nodes: Array[Node], clue: String): Node
- def assertSvgElement(node: Node, clue: String = "Error"): Element
- def assertTagMatches[Ref <: Element](tag: Tag[ReactiveElement[Ref]], node: Node, clue: String = "Error"): Ref
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def createCommentNode(text: String): Comment
Comment Nodes
- def createHtmlElement[Ref <: Element](tag: HtmlTag[Ref]): Ref
HTML Elements
- def createSvgElement[Ref <: Element](tag: SvgTag[Ref]): Ref
SVG Elements
- def createTextNode(text: String): Text
Text Nodes
- def debugNodeDescription(node: Node): String
- returns
e.g. a, div#mainSection, span.sideNote.sizeSmall
- def debugNodeInnerHtml(node: Node): String
- def debugNodeOuterHtml(node: Node): String
- def debugPath(element: Node, initial: List[String] = Nil): List[String]
- returns
hierarchical path describing the position and identity of this node, starting with the root.
- Annotations
- @tailrec()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def getAriaAttribute[V](element: Base, attr: AriaAttr[V]): UndefOr[V]
Aria attributes
- def getAriaAttributeRaw(element: Base, attr: AriaAttr[_]): UndefOr[String]
- def getChecked(element: Element): UndefOr[Boolean]
Input related stuff
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def getFiles(element: Element): UndefOr[List[File]]
- See also
https://developer.mozilla.org/en-US/docs/Web/API/File_API/Using_files_from_web_applications
- def getHtmlAttribute[V](element: Base, attr: HtmlAttr[V]): UndefOr[V]
HTML Attributes
- def getHtmlAttributeRaw(element: Base, attr: HtmlAttr[_]): UndefOr[String]
- def getHtmlProperty[V, DomV](element: Base, prop: HtmlProp[V, DomV]): UndefOr[V]
Returns
js.undefined
when the property is missing on the element.Returns
js.undefined
when the property is missing on the element. If the element type supports this property, it should never be js.undefined. - def getHtmlPropertyRaw[V, DomV](element: Base, prop: HtmlProp[V, DomV]): UndefOr[DomV]
- def getHtmlStyleRaw(element: Base, styleProp: StyleProp[_]): String
Note: this only gets inline style values – those set via the
style
attribute, which includes all style props set by Laminar.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
- def getSvgAttribute[V](element: Base, attr: SvgAttr[V]): UndefOr[V]
SVG Attributes
- def getSvgAttributeRaw(element: Base, attr: SvgAttr[_]): UndefOr[String]
- def getValue(element: Element): UndefOr[String]
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def insertBefore(parent: Base, newChild: Base, referenceChild: Base): Boolean
- def isCustomElement(element: Element): Boolean
Custom Elements
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def removeAriaAttribute(element: Base, attr: AriaAttr[_]): Unit
- def removeChild(parent: Base, child: Base): Boolean
- def removeEventListener[Ev <: Event](element: Base, listener: EventListener[Ev, _]): Unit
- def removeHtmlAttribute(element: Base, attr: HtmlAttr[_]): Unit
- def removeSvgAttribute(element: Base, attr: SvgAttr[_]): Unit
- def replaceChild(parent: Base, newChild: Base, oldChild: Base): Boolean
- def setAriaAttribute[V](element: Base, attr: AriaAttr[V], value: V): Unit
- def setChecked(element: Element, checked: Boolean): Boolean
- returns
whether the operation succeeded
- def setCommentNodeText(node: CommentNode, text: String): Unit
- def setHtmlAnyStyle[V](element: Base, style: StyleProp[V], value: |[V, String]): Unit
- def setHtmlAttribute[V](element: Base, attr: HtmlAttr[V], value: V): Unit
- def setHtmlProperty[V, DomV](element: Base, prop: HtmlProp[V, DomV], value: V): Unit
- def setHtmlStringStyle(element: Base, styleProp: StyleProp[_], value: String): Unit
- def setHtmlStyle[V](element: Base, styleProp: StyleProp[V], value: V): Unit
- def setSvgAttribute[V](element: Base, attr: SvgAttr[V], value: V): Unit
- def setTextNodeText(node: TextNode, text: String): Unit
- def setValue(element: Element, value: String): Boolean
- returns
whether the operation succeeded
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unsafeParseHtmlString[Ref <: Element](tag: HtmlTag[Ref], dangerousHtmlString: String): Ref
#WARNING: Only use on trusted HTML strings.
#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)
- def unsafeParseHtmlString(dangerousHtmlString: String): Element
#WARNING: Only use on trusted HTML strings.
#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)
- def unsafeParseHtmlStringIntoNodeArray(dangerousHtmlString: String): Array[Node]
#WARNING: Only use on trusted HTML strings.
#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
- def unsafeParseSvgString[Ref <: Element](tag: SvgTag[Ref], dangerousSvgString: String): Ref
#WARNING: Only use on trusted SVG strings.
#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)
- def unsafeParseSvgString(dangerousSvgString: String): Element
#WARNING: Only use on trusted SVG strings.
#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)
- def unsafeParseSvgStringIntoNodeArray(dangerousSvgString: String): Array[Node]
#WARNING: Only use on trusted SVG strings.
#WARNING: Only use on trusted SVG strings. SVG strings can contain embedded Javascript code, which this function will execute blindly!
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated