Skip to main content

$isSlotChild

function

Shape predicate: true when `node` carries the child's `__slotHost` field — i.e. it is an ElementNode or a DecoratorNode. Narrows to SlotChildNode. This is a type guard only; $setSlot rejects inline values at runtime. The slot link acts as a virtual shadow root, so any non-inline block — shadow root or not — can occupy a slot.

function $isSlotChild(node: LexicalNode): node is LexicalNode & SlotChildNode

Import

import { $isSlotChild } from '@modular/sdk/editor';