@domql/element 2.33.14 → 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.
- package/dist/cjs/methods/index.js +2 -1
- package/dist/cjs/mixins/html.js +15 -2
- package/dist/esm/methods/index.js +2 -1
- package/dist/esm/mixins/html.js +15 -2
- package/methods/index.js +1 -1
- package/mixins/html.js +16 -4
- package/package.json +6 -6
package/dist/cjs/mixins/html.js
CHANGED
|
@@ -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 =
|
|
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;
|
package/dist/esm/mixins/html.js
CHANGED
|
@@ -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 =
|
|
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
|
-
|
|
12
|
-
|
|
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.
|
|
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.
|
|
31
|
-
"@domql/render": "^2.33.
|
|
32
|
-
"@domql/state": "^2.33.
|
|
33
|
-
"@domql/utils": "^2.33.
|
|
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": "
|
|
35
|
+
"gitHead": "b27e25a07197b6fa84bb3d62a583bdc6cc16d5b5",
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@babel/core": "^7.27.1"
|
|
38
38
|
}
|