@domql/render 2.5.35 → 2.5.51
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/append.js +4 -3
- package/dist/cjs/append.js +4 -4
- package/package.json +2 -2
package/append.js
CHANGED
|
@@ -12,14 +12,15 @@ export const appendNode = (node, parentNode) => {
|
|
|
12
12
|
export const insertNodeAfter = (node, siblingNode, parentNode) => {
|
|
13
13
|
const parent = (parentNode || siblingNode.parentNode)
|
|
14
14
|
if (siblingNode.nextSibling) {
|
|
15
|
-
parent
|
|
15
|
+
parent && parent.insertBefore(node, siblingNode.nextSibling)
|
|
16
16
|
} else {
|
|
17
|
-
siblingNode
|
|
17
|
+
siblingNode && siblingNode.insertAdjacentElement('afterend', node)
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export const insertNodeBefore = (node, siblingNode, parentNode) => {
|
|
22
|
-
(parentNode || siblingNode.parentNode)
|
|
22
|
+
const parent = (parentNode || siblingNode.parentNode)
|
|
23
|
+
parent && parent.insertBefore(node, siblingNode)
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
/**
|
package/dist/cjs/append.js
CHANGED
|
@@ -31,14 +31,14 @@ const appendNode = (node, parentNode) => {
|
|
|
31
31
|
const insertNodeAfter = (node, siblingNode, parentNode) => {
|
|
32
32
|
const parent = parentNode || siblingNode.parentNode;
|
|
33
33
|
if (siblingNode.nextSibling) {
|
|
34
|
-
parent
|
|
34
|
+
parent && parent.insertBefore(node, siblingNode.nextSibling);
|
|
35
35
|
} else {
|
|
36
|
-
siblingNode
|
|
36
|
+
siblingNode && siblingNode.insertAdjacentElement("afterend", node);
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
const insertNodeBefore = (node, siblingNode, parentNode) => {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
const parent = parentNode || siblingNode.parentNode;
|
|
41
|
+
parent && parent.insertBefore(node, siblingNode);
|
|
42
42
|
};
|
|
43
43
|
const assignNode = (element, parent, key, attachOptions) => {
|
|
44
44
|
parent[key || element.key] = element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/render",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.51",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "index.js",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"build": "yarn build:cjs",
|
|
29
29
|
"prepublish": "rimraf -I dist && yarn build && yarn copy:package:cjs"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "75eb8c4728c904ec9f050a2eb9816502196caef9"
|
|
32
32
|
}
|