@domql/event 2.5.35 → 2.5.52
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/on.js +3 -3
- package/on.js +4 -4
- package/package.json +2 -2
package/dist/cjs/on.js
CHANGED
|
@@ -44,16 +44,16 @@ const triggerEventOnUpdate = (param, updatedObj, element, options) => {
|
|
|
44
44
|
return applyEventUpdate(element.on[param], updatedObj, element, state, context, options);
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
const applyEventsOnNode = (element) => {
|
|
47
|
+
const applyEventsOnNode = (element, options) => {
|
|
48
48
|
const { node, on } = element;
|
|
49
49
|
for (const param in on) {
|
|
50
|
-
if (param === "init" || param === "beforeClassAssign" || param === "render" || param === "renderRouter" || param === "attachNode" || param === "stateInit" || param === "stateCreated" || param === "
|
|
50
|
+
if (param === "init" || param === "beforeClassAssign" || param === "render" || param === "renderRouter" || param === "attachNode" || param === "stateInit" || param === "stateCreated" || param === "initStateUpdate" || param === "stateUpdate" || param === "initUpdate" || param === "update")
|
|
51
51
|
continue;
|
|
52
52
|
const appliedFunction = element.on[param];
|
|
53
53
|
if ((0, import_utils.isFunction)(appliedFunction)) {
|
|
54
54
|
node.addEventListener(param, (event) => {
|
|
55
55
|
const { state, context } = element;
|
|
56
|
-
appliedFunction(event, element, state, context);
|
|
56
|
+
appliedFunction(event, element, state, context, options);
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
}
|
package/on.js
CHANGED
|
@@ -24,7 +24,7 @@ export const triggerEventOnUpdate = (param, updatedObj, element, options) => {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export const applyEventsOnNode = element => {
|
|
27
|
+
export const applyEventsOnNode = (element, options) => {
|
|
28
28
|
const { node, on } = element
|
|
29
29
|
for (const param in on) {
|
|
30
30
|
if (
|
|
@@ -35,8 +35,8 @@ export const applyEventsOnNode = element => {
|
|
|
35
35
|
param === 'attachNode' ||
|
|
36
36
|
param === 'stateInit' ||
|
|
37
37
|
param === 'stateCreated' ||
|
|
38
|
-
param === '
|
|
39
|
-
param === '
|
|
38
|
+
param === 'initStateUpdate' ||
|
|
39
|
+
param === 'stateUpdate' ||
|
|
40
40
|
param === 'initUpdate' ||
|
|
41
41
|
param === 'update'
|
|
42
42
|
) continue
|
|
@@ -45,7 +45,7 @@ export const applyEventsOnNode = element => {
|
|
|
45
45
|
if (isFunction(appliedFunction)) {
|
|
46
46
|
node.addEventListener(param, event => {
|
|
47
47
|
const { state, context } = element
|
|
48
|
-
appliedFunction(event, element, state, context)
|
|
48
|
+
appliedFunction(event, element, state, context, options)
|
|
49
49
|
})
|
|
50
50
|
}
|
|
51
51
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/event",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.52",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"@domql/report": "latest",
|
|
33
33
|
"@domql/utils": "latest"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "d417eb4852233ff71f790eae23b67b521e80c4f9"
|
|
36
36
|
}
|