Wrappers around org.scalajs.dom.raw.Node and subclasses, such that the wrapper around org.scalajs.dom.raw.Element conforms to the
eu.cdevreeze.yaidom.queryapi.ElemLike API.
Not all DOM node types are exposed via these wrappers. For example, attributes are not nodes according to the ElemLike API,
so there is no wrapper for attributes.
Use these wrappers only if there is a specific need for them. They are not immutable, and they are not thread-safe.
On the other hand, in the browser this is not an issue.
The wrappers are very light-weight, and typically very short-lived. On the other hand, each query may create many wrapper
instances for the query results. By design, the only state of each wrapper instance is the wrapped DOM node, so changes to
the state of that wrapped DOM node cannot corrupt the wrapper instance.
This does have a down-side, namely that Path (relative to the root element) and base URI computations are expensive.
Therefore these JS DOM wrappers are not the best performing BackingElemApi element implementations if fast Path and
base URI computations are required. Yaidom native indexed elements may be better in those cases, and JS DOM wrappers
could be used as "builders" of those indexed elements.
Wrappers around
org.scalajs.dom.raw.Node
and subclasses, such that the wrapper aroundorg.scalajs.dom.raw.Element
conforms to theeu.cdevreeze.yaidom.queryapi.ElemLike
API.Not all DOM node types are exposed via these wrappers. For example, attributes are not nodes according to the
ElemLike
API, so there is no wrapper for attributes.Use these wrappers only if there is a specific need for them. They are not immutable, and they are not thread-safe. On the other hand, in the browser this is not an issue.
The wrappers are very light-weight, and typically very short-lived. On the other hand, each query may create many wrapper instances for the query results. By design, the only state of each wrapper instance is the wrapped DOM node, so changes to the state of that wrapped DOM node cannot corrupt the wrapper instance.
This does have a down-side, namely that Path (relative to the root element) and base URI computations are expensive. Therefore these JS DOM wrappers are not the best performing
BackingElemApi
element implementations if fast Path and base URI computations are required. Yaidom native indexed elements may be better in those cases, and JS DOM wrappers could be used as "builders" of those indexed elements.