Home > @holoflows/kit > DOMProxy
DOMProxy provide an interface that be stable even dom is changed.
Signature:
export interface DOMProxy<ProxiedElement extends Node = HTMLElement, Before extends Element = HTMLSpanElement, After extends Element = HTMLSpanElement> extends DOMProxy_Properties<ProxiedElement, Before, After>
Extends: DOMProxy_Properties<ProxiedElement, Before, After>
DOMProxy provide 3 nodes. before
, current
and after
. current
is a fake dom node powered by Proxy, it will forward all your operations to the realCurrent
.
before
and after
is a true span
that always point to before and after of realCurrent
Special Handlers:
*forward*: forward to current realCurrent
*undo*: undo effect when realCurrent
changes
*move*: move effect to new realCurrent
- style (forward, undo, move) - addEventListener (forward, undo, move) - appendChild (forward, undo, move)
Method |
Description |
---|---|