@domql/render 2.29.40 → 2.29.41

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 CHANGED
@@ -5,9 +5,9 @@
5
5
  * and assigns them into real DOM tree
6
6
  */
7
7
  export const appendNode = (node, parentNode, el) => {
8
+ const win = el?.context?.window || window
8
9
  try {
9
10
  if (parentNode && typeof parentNode.appendChild === 'function') {
10
- const win = el.context.window || window
11
11
  if (
12
12
  parentNode instanceof win.Node &&
13
13
  typeof parentNode.appendChild === 'function'
@@ -25,10 +25,11 @@ __export(append_exports, {
25
25
  });
26
26
  module.exports = __toCommonJS(append_exports);
27
27
  const appendNode = (node, parentNode, el) => {
28
+ var _a;
29
+ const win = ((_a = el == null ? void 0 : el.context) == null ? void 0 : _a.window) || window;
28
30
  try {
29
31
  if (parentNode && typeof parentNode.appendChild === "function") {
30
- const win2 = el.context.window || window;
31
- if (parentNode instanceof win2.Node && typeof parentNode.appendChild === "function") {
32
+ if (parentNode instanceof win.Node && typeof parentNode.appendChild === "function") {
32
33
  parentNode.appendChild(node);
33
34
  } else {
34
35
  throw new Error(
@@ -1,8 +1,9 @@
1
1
  const appendNode = (node, parentNode, el) => {
2
+ var _a;
3
+ const win = ((_a = el == null ? void 0 : el.context) == null ? void 0 : _a.window) || window;
2
4
  try {
3
5
  if (parentNode && typeof parentNode.appendChild === "function") {
4
- const win2 = el.context.window || window;
5
- if (parentNode instanceof win2.Node && typeof parentNode.appendChild === "function") {
6
+ if (parentNode instanceof win.Node && typeof parentNode.appendChild === "function") {
6
7
  parentNode.appendChild(node);
7
8
  } else {
8
9
  throw new Error(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/render",
3
- "version": "2.29.40",
3
+ "version": "2.29.41",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "index.js",
@@ -18,9 +18,9 @@
18
18
  "dist"
19
19
  ],
20
20
  "dependencies": {
21
- "@domql/event": "^2.29.40",
22
- "@domql/report": "^2.29.40",
23
- "@domql/utils": "^2.29.40"
21
+ "@domql/event": "^2.29.41",
22
+ "@domql/report": "^2.29.41",
23
+ "@domql/utils": "^2.29.41"
24
24
  },
25
25
  "scripts": {
26
26
  "copy:package:cjs": "cp ../../build/package-cjs.json dist/cjs/package.json",
@@ -29,5 +29,5 @@
29
29
  "build": "npx rimraf -I dist; npm run build:cjs; npm run build:esm",
30
30
  "prepublish": "npx rimraf -I dist && npm run build && npm run copy:package:cjs"
31
31
  },
32
- "gitHead": "8095929229562388221836b361480f3ecc22b20f"
32
+ "gitHead": "4a29e8f6c49b6765624ad45c11f24d9558033592"
33
33
  }