Class: SlotBinding

lib/core/renderer/program/blocks.SlotBinding(anchor, createInstance, blocks, locals, onBlockMountedopt)

Renders transcluded content, or the slot's fallback block.

Transclusion itself is still owned by the component mounter, which knows what the parent passed down. This binding owns the position and the fallback, and reports the anchor so the mounter can place content at it.

Constructor

new SlotBinding(anchor, createInstance, blocks, locals, onBlockMountedopt)

Parameters:
Name Type Attributes Description
anchor Text

The op's anchor.

createInstance function

Builds a template instance for a block.

blocks Array:.<object:>

The program's block table.

locals object | null

The enclosing block's local bindings.

onBlockMounted function <optional>

Announces a mounted block.

Source:

Members

fallbackRange :BlockRange|null

Type:
  • BlockRange | null
Source:

filled :boolean

Type:
  • boolean
Source:

Methods

dispose()

Releases the fallback.

Source:

update(op)

Renders the fallback when nothing has been transcluded into this slot.

Parameters:
Name Type Description
op object

The slot op.

Source: