Constructor
new BlockRange(block, createInstance, locals)
Parameters:
| Name | Type | Description |
|---|---|---|
block |
object | The block program. |
createInstance |
function | Builds a template instance for a block. |
locals |
object | null | Local bindings for this block's expressions. |
Members
instance :object
Type:
- object
locals :object|null
Type:
- object | null
nodes :Array:.<Node:>
Type:
usable
Whether the block could be prepared in this host environment.
Methods
dispose()
Removes this block's nodes and releases its effects.
mount(parent, after) → {Node}
Creates the block's DOM and inserts it after after.
Parameters:
| Name | Type | Description |
|---|---|---|
parent |
Node | The parent node. |
after |
Node | The node to insert after. |
Returns:
The last node inserted, for chaining.
- Type
- Node
moveAfter(parent, after) → {Node}
Moves this block's nodes so they follow after, preserving their order.
Parameters:
| Name | Type | Description |
|---|---|---|
parent |
Node | The parent node. |
after |
Node | The node to follow. |
Returns:
The last node of this range.
- Type
- Node