Skip to content

Commit

Permalink
fix issue with fn-events not removing bogus attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
loreanvictor committed Aug 27, 2023
1 parent 8b48ac0 commit 6c85b33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rehtm",
"version": "0.5.0",
"version": "0.5.1",
"description": "create HTML using HTM",
"main": "dist/commonjs/index.js",
"module": "dist/es/index.js",
Expand Down
1 change: 1 addition & 0 deletions src/extensions/functional-events.ext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const functionalEventListenerExt: DOMFactoryExt = {
if (name.startsWith('on') && typeof value === 'function') {
const eventName = name.slice(2).toLowerCase()
node.addEventListener(eventName as keyof ElementEventMap, value as EventListener)
node.removeAttribute(name)
} else {
fallback()
}
Expand Down

0 comments on commit 6c85b33

Please sign in to comment.