[]previous and next page

moveRegion

Moves a region to a new parent: its nodes still in the old parent go through move (which puts each at the end of parent), and later commits reconcile there.

Moves a region to a new parent: its nodes still in the old parent go through move (which puts each at the end of parent), and later commits reconcile there. The region keeps its effects, so what it shows is not built again. Only for a region without an anchor.

Import#

ts
import { moveRegion } from "@shadow-js/web/extend";

Signature#

ts
function moveRegion(region: Region, parent: Node, move: (node: Node) => void): void

Parameters#

Name Description
region The region to move.
parent The node that receives the region's nodes.
move Puts one node at the end of parent (appendChild, or moveBefore where it exists).