From 58b3ea63cc7273e9581c73eaed9ead753633875b Mon Sep 17 00:00:00 2001 From: Conduitry Date: Fri, 4 Jan 2019 20:35:58 -0500 Subject: [PATCH] fix malformed code in window binding event handlers (#1963) --- src/compile/render-dom/wrappers/Window.ts | 4 ++-- .../samples/window-binding-multiple-handlers/_config.js | 3 +++ .../samples/window-binding-multiple-handlers/main.html | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 test/runtime/samples/window-binding-multiple-handlers/_config.js create mode 100644 test/runtime/samples/window-binding-multiple-handlers/main.html 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 @@ + +