@domql/event 2.3.75 → 2.3.76
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/index.js +4 -2
- package/on.js +7 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -4,11 +4,13 @@ import * as on from './on'
|
|
|
4
4
|
import * as can from './can'
|
|
5
5
|
import * as is from './is'
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const applyEvent = on.applyEvent
|
|
8
|
+
const triggerEventOn = on.triggerEventOn
|
|
8
9
|
|
|
9
10
|
export {
|
|
10
11
|
on,
|
|
11
|
-
|
|
12
|
+
applyEvent,
|
|
13
|
+
triggerEventOn,
|
|
12
14
|
can,
|
|
13
15
|
is
|
|
14
16
|
}
|
package/on.js
CHANGED
|
@@ -10,10 +10,16 @@ export const render = (param, element, state) => {
|
|
|
10
10
|
param(element, state)
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export const
|
|
13
|
+
export const applyEvent = (param, element, state, context) => {
|
|
14
14
|
return param(element, state || element.state, context || element.context)
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
export const triggerEventOn = (param, element) => {
|
|
18
|
+
if (element.on && isFunction(element.on[param])) {
|
|
19
|
+
return applyEvent(element.on[param], element)
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
17
23
|
export const initUpdate = (element) => {
|
|
18
24
|
const { ref, state, on } = element
|
|
19
25
|
const { props } = ref
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/event",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.76",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
"@domql/globals": "latest",
|
|
11
11
|
"@domql/utils": "latest"
|
|
12
12
|
},
|
|
13
|
-
"gitHead": "
|
|
13
|
+
"gitHead": "06040452ffd984e064e8ec4737e829e62662070c",
|
|
14
14
|
"source": "index.js"
|
|
15
15
|
}
|