unsafeWrapInSingleElement

Type: Function

Places the contents of the given range under the given element. Splits the start / end if needed. Does not validate and does not hold any restrictions into account.

Unsafe, do not use directly. The "unsafe" part in this function only refers to the fact that the function does not do any validation, in contrast to primitives that always guarantee a schema-valid result on an unmodified blueprint.

Arguments

  1. wrapperParent

    (Required)

    Type: Node

    The parent which nodes to ultimately wrap

  2. wrappingStartPosition

    (Required)

    Where to start wrapping

  3. wrappingEndPosition

    (Required)

    Where to stop wrapping

  4. wrapperElement

    (Required)

    Type: Node

    The element / documentFragment to wrap under

  5. blueprint

    (Required)

    Type: Blueprint

    The blueprint in which to consider the wrap

  6. referenceNode

    (Required)

    Type: Node | NULL

    The node before which to place the nodes, or null to place the nodes at the end of wrapperElement