Support use with existing nodes
This commit is contained in:
parent
c9aab425fe
commit
10cb9c1b34
|
@ -36,9 +36,6 @@ export class Widget implements EventTarget {
|
|||
this.node.remove();
|
||||
}
|
||||
|
||||
field parentField: ParentNode | null = null;
|
||||
this.parentField = parentField;
|
||||
|
||||
const thisTemplate = template();
|
||||
dataflow {
|
||||
const nodes = this.nodeGenerator(thisTemplate);
|
||||
|
@ -52,6 +49,9 @@ export class Widget implements EventTarget {
|
|||
}
|
||||
}
|
||||
|
||||
field parentField: ParentNode | null = this._node?.parentNode ?? null;
|
||||
this.parentField = parentField;
|
||||
|
||||
dataflow {
|
||||
const p = this.parentField.value;
|
||||
if (this.node.parentNode !== p) {
|
||||
|
|
Loading…
Reference in New Issue