@domql/element 2.33.13 → 2.33.17

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.
@@ -335,7 +335,8 @@ function call(fnKey, ...args) {
335
335
  }
336
336
  return result;
337
337
  } catch (error2) {
338
- console.error(`Error calling function: '${fnKey}'`);
338
+ console.error(`Error calling function: '${fnKey}'
339
+ `, error2);
339
340
  throw new Error(error2);
340
341
  }
341
342
  }
@@ -22,10 +22,23 @@ __export(html_exports, {
22
22
  html: () => html
23
23
  });
24
24
  module.exports = __toCommonJS(html_exports);
25
- var import_utils = require("@domql/utils");
26
25
  function html(param, element, node, opts) {
27
26
  var _a;
28
- const prop = (0, import_utils.exec)(param, element, element.state, element.context, opts) || (0, import_utils.exec)((_a = element == null ? void 0 : element.props) == null ? void 0 : _a.html, element, element.state, element.context, opts);
27
+ const prop = element.call(
28
+ "exec",
29
+ param,
30
+ element,
31
+ element.state,
32
+ element.context,
33
+ opts
34
+ ) || element.call(
35
+ "exec",
36
+ (_a = element == null ? void 0 : element.props) == null ? void 0 : _a.html,
37
+ element,
38
+ element.state,
39
+ element.context,
40
+ opts
41
+ );
29
42
  const { __ref } = element;
30
43
  if (prop !== __ref.__html) {
31
44
  if (node.nodeName === "SVG") node.textContent = prop;
@@ -294,7 +294,8 @@ function call(fnKey, ...args) {
294
294
  }
295
295
  return result;
296
296
  } catch (error2) {
297
- console.error(`Error calling function: '${fnKey}'`);
297
+ console.error(`Error calling function: '${fnKey}'
298
+ `, error2);
298
299
  throw new Error(error2);
299
300
  }
300
301
  }
@@ -1,7 +1,20 @@
1
- import { exec } from "@domql/utils";
2
1
  function html(param, element, node, opts) {
3
2
  var _a;
4
- const prop = exec(param, element, element.state, element.context, opts) || exec((_a = element == null ? void 0 : element.props) == null ? void 0 : _a.html, element, element.state, element.context, opts);
3
+ const prop = element.call(
4
+ "exec",
5
+ param,
6
+ element,
7
+ element.state,
8
+ element.context,
9
+ opts
10
+ ) || element.call(
11
+ "exec",
12
+ (_a = element == null ? void 0 : element.props) == null ? void 0 : _a.html,
13
+ element,
14
+ element.state,
15
+ element.context,
16
+ opts
17
+ );
5
18
  const { __ref } = element;
6
19
  if (prop !== __ref.__html) {
7
20
  if (node.nodeName === "SVG") node.textContent = prop;
package/methods/index.js CHANGED
@@ -379,7 +379,7 @@ export function call(fnKey, ...args) {
379
379
  // Return synchronous results directly
380
380
  return result
381
381
  } catch (error) {
382
- console.error(`Error calling function: '${fnKey}'`)
382
+ console.error(`Error calling function: '${fnKey}'\n`, error)
383
383
  throw new Error(error)
384
384
  }
385
385
  }
package/mixins/html.js CHANGED
@@ -1,15 +1,27 @@
1
1
  'use strict'
2
2
 
3
- import { exec } from '@domql/utils'
4
-
5
3
  /**
6
4
  * Appends raw HTML as content
7
5
  * an original one as a child
8
6
  */
9
7
  export function html(param, element, node, opts) {
10
8
  const prop =
11
- exec(param, element, element.state, element.context, opts) ||
12
- exec(element?.props?.html, element, element.state, element.context, opts)
9
+ element.call(
10
+ 'exec',
11
+ param,
12
+ element,
13
+ element.state,
14
+ element.context,
15
+ opts
16
+ ) ||
17
+ element.call(
18
+ 'exec',
19
+ element?.props?.html,
20
+ element,
21
+ element.state,
22
+ element.context,
23
+ opts
24
+ )
13
25
  const { __ref } = element
14
26
  if (prop !== __ref.__html) {
15
27
  // const parser = new window.DOMParser()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/element",
3
- "version": "2.33.13",
3
+ "version": "2.33.17",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "index.js",
@@ -27,12 +27,12 @@
27
27
  "prepublish": "npx rimraf -I dist && npm run build && npm run copy:package:cjs"
28
28
  },
29
29
  "dependencies": {
30
- "@domql/event": "^2.33.13",
31
- "@domql/render": "^2.33.13",
32
- "@domql/state": "^2.33.13",
33
- "@domql/utils": "^2.33.13"
30
+ "@domql/event": "^2.33.17",
31
+ "@domql/render": "^2.33.17",
32
+ "@domql/state": "^2.33.17",
33
+ "@domql/utils": "^2.33.17"
34
34
  },
35
- "gitHead": "3d34d72f2ada44fdb269644cc915d3ef84cfe360",
35
+ "gitHead": "b27e25a07197b6fa84bb3d62a583bdc6cc16d5b5",
36
36
  "devDependencies": {
37
37
  "@babel/core": "^7.27.1"
38
38
  }