Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate event handlers generated for svelte:element on:x #8129

Closed
dominikg opened this issue Dec 19, 2022 · 1 comment · Fixed by #8142
Closed

duplicate event handlers generated for svelte:element on:x #8129

dominikg opened this issue Dec 19, 2022 · 1 comment · Fixed by #8142
Labels
bug compiler Changes relating to the compiler

Comments

@dominikg
Copy link
Member

Describe the bug

<svelte:element this="a" on:keydown></svelte:element>

leads to

function instance($$self) {
	function keydown_handler(event) {
		bubble.call(this, $$self, event);
	}

	function keydown_handler(event) {
		bubble.call(this, $$self, event);
	}

	return [keydown_handler];
}

this triggers an error in esbuild 0.16.9 that prevents duplicate names - which might be a bug in esbuild too since their changelog mentions same name functions are ok. see sveltejs/kit#8217

Reproduction

// svelte:element added in 3.47.0
https://svelte.dev/repl/31ddc37cfd684fd78310e6eb74b63e2c?version=3.47.0

// same behavior in current 3.55.0
https://svelte.dev/repl/31ddc37cfd684fd78310e6eb74b63e2c?version=3.55.0

Logs

No response

System Info

-

Severity

annoyance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug compiler Changes relating to the compiler
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants