Class: BlockRange

lib/core/renderer/program/blocks~BlockRange(block, createInstance, locals)

One rendered block: its instance and the nodes it put in the document.

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.

Source:

Members

instance :object

Type:
  • object
Source:

locals :object|null

Type:
  • object | null
Source:

nodes :Array:.<Node:>

Type:
  • Array:.<Node:>
Source:

usable

Whether the block could be prepared in this host environment.

Source:

Methods

dispose()

Removes this block's nodes and releases its effects.

Source:

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.

Source:
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.

Source:
Returns:

The last node of this range.

Type
Node