Remove preventDefault from inline event listeners
This commit is contained in:
parent
2e1ee0358c
commit
742eb36035
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ const parseArgs = (element, before, ...args) => {
|
|||
else if (key == "shadowRoot")
|
||||
parseArgs((element.shadowRoot || element.attachShadow({mode: "open"})), null, arg[key])
|
||||
else if (typeof arg[key] === "function")
|
||||
element.addEventListener(key.replace(/^on[A-Z]/, x => x.charAt(x.length-1).toLowerCase()), e => e.preventDefault() || arg[key](e))
|
||||
element.addEventListener(key.replace(/^on[A-Z]/, x => x.charAt(x.length-1).toLowerCase()), arg[key])
|
||||
else if (arg[key] === true)
|
||||
{if (!element.hasAttribute(key)) element.setAttribute(key, '')}
|
||||
else if (arg[key] === false)
|
||||
|
|
Loading…
Reference in a new issue