ph-utils 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/dom.js +2 -2
- package/package.json +1 -1
package/lib/dom.js
CHANGED
@@ -59,12 +59,12 @@ export function transform(element, value) {
|
|
59
59
|
export function on(element, listener, fn, once = false) {
|
60
60
|
let eventExtra = {};
|
61
61
|
if (typeof once === 'boolean') {
|
62
|
-
eventExtra.once =
|
62
|
+
eventExtra.once = once;
|
63
63
|
}
|
64
64
|
else {
|
65
65
|
eventExtra = once;
|
66
66
|
}
|
67
|
-
if (eventExtra.eventFlag
|
67
|
+
if (eventExtra.eventFlag != null) {
|
68
68
|
element.setAttribute(eventExtra.eventFlag, '__stop__');
|
69
69
|
element.addEventListener(listener, (e) => {
|
70
70
|
let target = e.target;
|