Core.RootNode Class
samsara/core/nodes/RootNode.js:6
A RootNode is a first node in the Render Tree. It is like any other RenderTreeNode but with the additional responsibility of defining an allocating DOM node to render to.
Constructor
Core.RootNode
-
[allocator]
Parameters:
-
[allocator]
ElementAllocator optionalElementAllocator
Item Index
Methods
Methods
add
-
node
Extends the render tree with a new node. Similar to how a tree data structure is created, but instead of a node with an array of children, children subscribe to notifications from the parent.
Nodes can be instances of LayoutNode
, SizeNode
, or Object literals with
size and layout properties, in which case, appropriate nodes will be created.
This method also takes Views
(subtrees) and Surfaces
(leaves).
Returns:
remove
()
Remove the node from the Render Tree
setAllocator
-
allocator
Define an allocator
Parameters:
-
allocator
AllocatorAllocator