Skip to content

Commit

Permalink
upgrade sprae
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Nelson committed Apr 21, 2024
1 parent 1876ff3 commit b40ec78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "",
"license": "MIT",
"author": "live-template",
"version": "0.4.0",
"version": "0.4.1",
"type": "module",
"main": "index.js",
"module": "index.js",
Expand All @@ -17,7 +17,7 @@
"@preact/signals-core": "^1.6.0",
"http-server": "^14.1.1",
"phx-live-state": "^0.11.2",
"sprae": "9.0.1",
"sprae": "^9.1.1",
"wc-context": "^1.0.0"
},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion src/live-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class LiveTemplateElement extends HTMLElement {
}

sendEventDirective(eventName) {
return (el, evaluate, state) => {
const dir = (el, evaluate, state, name) => {
let removeOldListener;
return () => {
removeOldListener?.();
Expand All @@ -54,6 +54,8 @@ export class LiveTemplateElement extends HTMLElement {
el.addEventListener(eventName, handler);
}
}
dir.parse = (value) => value;
return dir;
}

sendEvent(eventName, e) {
Expand Down

0 comments on commit b40ec78

Please sign in to comment.