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

[WIP] Avoid binding event handler callbacks #449

Closed
wants to merge 2 commits into from
Closed

Conversation

Rich-Harris
Copy link
Member

Ref #433. Before starting on this, I figured it'd make sense to add a new category of tests, so we can verify the code generation is working as expected. We should avoid making too many of those tests since keeping them current could become a chore, but I don't see a good alternative for stuff like this.

@Rich-Harris
Copy link
Member Author

This is still WIP — still relies on this for getting contextual data, which apparently there aren't any tests for (otherwise I would expect this to fail). Realised that it probably makes sense to work on hoisting normal event handlers first (it makes no sense to recreate handlers for items in a list, when we can just stick contextual info on node.__svelte and share a handler between multiple listeners), and that puts a bit more pressure on refactoring some of the generator/fragment stuff, so I think I'm going to put this on pause for a bit and investigate that.

@Rich-Harris
Copy link
Member Author

closing in favour of #456

@Conduitry Conduitry deleted the gh-433 branch July 26, 2018 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant