diff --git a/src/compile/render-dom/wrappers/Window.ts b/src/compile/render-dom/wrappers/Window.ts index beacaaf254..7bf41cdc0b 100644 --- a/src/compile/render-dom/wrappers/Window.ts +++ b/src/compile/render-dom/wrappers/Window.ts @@ -114,7 +114,7 @@ export default class WindowWrapper extends Wrapper { }); block.event_listeners.push(deindent` - @addListener(window, "${event}", ctx.${handler_name}); + @addListener(window, "${event}", ctx.${handler_name}) `); } @@ -179,4 +179,4 @@ export default class WindowWrapper extends Wrapper { `); } } -} \ No newline at end of file +} diff --git a/test/runtime/samples/window-binding-multiple-handlers/_config.js b/test/runtime/samples/window-binding-multiple-handlers/_config.js new file mode 100644 index 0000000000..2f7c6be562 --- /dev/null +++ b/test/runtime/samples/window-binding-multiple-handlers/_config.js @@ -0,0 +1,3 @@ +export default { + html: '' +}; diff --git a/test/runtime/samples/window-binding-multiple-handlers/main.html b/test/runtime/samples/window-binding-multiple-handlers/main.html new file mode 100644 index 0000000000..8b28d53a9f --- /dev/null +++ b/test/runtime/samples/window-binding-multiple-handlers/main.html @@ -0,0 +1,2 @@ + +