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.
Files changed (2) hide show
  1. package/lib/node/node.js +1 -1
  2. 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')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "als-document",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "A powerful HTML parser & DOM manipulation library for both backend and frontend.",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",