als-document 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/node/node.js +1 -1
- package/package.json +1 -1
package/lib/node/node.js
CHANGED
|
@@ -160,8 +160,8 @@ class Node {
|
|
|
160
160
|
|
|
161
161
|
set innerHTML(html) {
|
|
162
162
|
this.childNodes = html.trim().startsWith('<') ? parseHTML(html).childNodes : [html]
|
|
163
|
+
this.children.forEach(child => child.parent = this);
|
|
163
164
|
}
|
|
164
|
-
|
|
165
165
|
set outerHTML(html) {
|
|
166
166
|
const parsed = parseHTML(html);
|
|
167
167
|
if (!this.parent) throw new Error('element has no parent node')
|