@domql/element
Advanced tools
Comparing version 2.5.58 to 2.5.59
@@ -30,6 +30,8 @@ "use strict"; | ||
const eventName = (0, import_utils.lowercaseFirstLetter)(v.split("on")[1]); | ||
if (on[eventName]) { | ||
const origEvent = on[eventName]; | ||
if ((0, import_utils.isFunction)(origEvent)) { | ||
on[eventName] = (...args) => { | ||
on[eventName](...args); | ||
props[v](...args); | ||
const originalEventRetunrs = origEvent(...args); | ||
if (originalEventRetunrs !== false) | ||
props[v](...args); | ||
}; | ||
@@ -36,0 +38,0 @@ } else |
{ | ||
"name": "@domql/element", | ||
"version": "2.5.58", | ||
"version": "2.5.59", | ||
"license": "MIT", | ||
@@ -34,3 +34,3 @@ "type": "module", | ||
}, | ||
"gitHead": "36a53f5bfa636ece24b9a2a7ad411218df0dfc86", | ||
"gitHead": "8f9fd6c8f0c9b79542859548862864a0edc15e8e", | ||
"devDependencies": { | ||
@@ -37,0 +37,0 @@ "@babel/core": "^7.12.0" |
'use strict' | ||
import { lowercaseFirstLetter } from '@domql/utils' | ||
import { isFunction, lowercaseFirstLetter } from '@domql/utils' | ||
@@ -10,6 +10,7 @@ export const propagateEventsFromProps = (element) => { | ||
const eventName = lowercaseFirstLetter(v.split('on')[1]) | ||
if (on[eventName]) { | ||
const origEvent = on[eventName] | ||
if (isFunction(origEvent)) { | ||
on[eventName] = (...args) => { | ||
on[eventName](...args) | ||
props[v](...args) | ||
const originalEventRetunrs = origEvent(...args) | ||
if (originalEventRetunrs !== false) props[v](...args) | ||
} | ||
@@ -16,0 +17,0 @@ } else on[eventName] = props[v] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
180300
4912