fn
parseDOMSlice
Read a DOM subtree into a fragment. Only the model comes out: no element of the source, no style, no attribute the rules did not ask for. Works on a detached (inert) document or a live one.
Signature
ts
export function parseDOMSlice(root: globalThis.Node, registry: Registry): Slice{ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
root | globalThis.Node | — |
registry | Registry | — |
Returns
Slice| Property | Type | Description |
|---|---|---|
blocks | readonly Node[] | — |
openStart | boolean | The first block's runs continue the block the caret is in — no boundary before them. |
openEnd | boolean | The last block stays open: the caret lands inside it and the tail of the split block joins it. |