Trait

com.raquo.dombuilder.generic.nodes

Root

Related Doc: package nodes

Permalink

trait Root[N, +ParentRef <: BaseRef, BaseRef] extends ParentNode[N, ParentRef, BaseRef]

This trait represents the root of your Scala DOM Builder tree. It represents the root of the DOM subtree that you manage with Scala DOM Builder, not the whole DOM Document.

Scala DOM Builder assumes that you do not manipulate DOM nodes represented by this subtree outside of Scala DOM Builder (e.g. by using other libraries or calling native JS DOM functions directly) in ways that would have affected the state of your Scala DOM Builder tree if those changes were made using Scala DOM Builder.

So for example, moving a real DOM node that is represented in your Scala DOM Builder to a different parent would cause the real DOM hierarchy to become inconsistent with the parent-children links that are recorded in your Scala DOM Builder tree. If you then do anything that relies on those links to be correct, your code would produce unexpected results.

On the other hand, if you say update an attribute of some real DOM node without going through Scala DOM Builder, that is completely fine because Scala DOM Builder by itself does not keep track of the attributes that exist on DOM nodes. Your application code might, but after attr := value setter is executed, it is normally discarded.

Note: Scala DOM Builder doesn't actively police its DOM tree for inconsistencies with the real DOM.

Self Type
Root[N, ParentRef, BaseRef] with N
Linear Supertypes
ParentNode[N, ParentRef, BaseRef], Node[N, ParentRef, BaseRef], domtypes.generic.nodes.Node, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Root
  2. ParentNode
  3. Node
  4. Node
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type BaseChildNode = N with ChildNode[N, BaseRef, BaseRef]

    Permalink
    Definition Classes
    Node
  2. type BaseElement = N with Element[N, BaseRef, BaseRef]

    Permalink
    Definition Classes
    Node
  3. type BaseNode = N with Node[N, BaseRef, BaseRef]

    Permalink
    Definition Classes
    Node
  4. type BaseParentNode = N with ParentNode[N, BaseRef, BaseRef]

    Permalink
    Definition Classes
    Node

Abstract Value Members

  1. abstract val child: (Root.this)#BaseChildNode

    Permalink
  2. abstract val container: ParentRef

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def appendChild(child: (Root.this)#BaseChildNode)(implicit treeApi: TreeApi[N, BaseRef]): Boolean

    Permalink

    returns

    Whether child was successfully appended

    Definition Classes
    ParentNode
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. def indexOfChild(child: (Root.this)#BaseChildNode): Int

    Permalink
    Definition Classes
    ParentNode
  13. def insertChild(child: (Root.this)#BaseChildNode, atIndex: Int)(implicit treeApi: TreeApi[N, BaseRef]): Boolean

    Permalink

    returns

    Whether child was successfully inserted

    Definition Classes
    ParentNode
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. def maybeChildren: Option[Buffer[(Root.this)#BaseChildNode]]

    Permalink
    Definition Classes
    ParentNode
    Annotations
    @inline()
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. val ref: ParentRef

    Permalink

    When we create a Root, we don't want to create a new HTML Element, we want to use a reference to an existing element, the container.

    When we create a Root, we don't want to create a new HTML Element, we want to use a reference to an existing element, the container.

    Definition Classes
    RootNode
  20. def removeChild(child: (Root.this)#BaseChildNode)(implicit treeApi: TreeApi[N, BaseRef]): Boolean

    Permalink

    returns

    Whether child was successfully removed

    Definition Classes
    ParentNode
  21. def replaceAllChildren(newChildren: Iterable[(Root.this)#BaseChildNode])(implicit treeApi: TreeApi[N, BaseRef]): Unit

    Permalink
    Definition Classes
    ParentNode
  22. def replaceChild(oldChild: (Root.this)#BaseChildNode, newChild: (Root.this)#BaseChildNode)(implicit treeApi: TreeApi[N, BaseRef]): Boolean

    Permalink

    Note: Does nothing if oldChild was not found in parent's children, or if oldChild==newChild

    Note: Does nothing if oldChild was not found in parent's children, or if oldChild==newChild

    returns

    Whether child was replaced

    Definition Classes
    ParentNode
  23. def replaceChildren(fromIndex: Int, toIndex: Int, newChildren: Iterable[(Root.this)#BaseChildNode])(implicit treeApi: TreeApi[N, BaseRef]): Boolean

    Permalink

    Note: Does nothing if fromIndex or toIndex are out of bounds or if fromIndex>toIndex

    Note: Does nothing if fromIndex or toIndex are out of bounds or if fromIndex>toIndex

    returns

    Whether children were replaced

    Definition Classes
    ParentNode
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. def unmount()(implicit treeApi: TreeApi[N, BaseRef]): Boolean

    Permalink

    returns

    Whether child was successfully unmounted

  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ParentNode[N, ParentRef, BaseRef]

Inherited from Node[N, ParentRef, BaseRef]

Inherited from domtypes.generic.nodes.Node

Inherited from AnyRef

Inherited from Any

Ungrouped