Merge pull request #1964 from sveltejs/gh-1963

fix malformed code in window binding event handlers
pull/1967/head
Rich Harris 6 years ago committed by GitHub
commit 2f8727d968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 {
`);
}
}
}
}

@ -0,0 +1,3 @@
export default {
html: '<button>Click</button>'
};

@ -0,0 +1,2 @@
<svelte:window bind:innerWidth={width} bind:innerHeight={height}/>
<button on:click={() => {}}>Click</button>
Loading…
Cancel
Save