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

Multiple bindings in a single event handler #922

Merged
merged 15 commits into from
Nov 21, 2017
Merged

Multiple bindings in a single event handler #922

merged 15 commits into from
Nov 21, 2017

Conversation

Rich-Harris
Copy link
Member

Ref #910

@Rich-Harris
Copy link
Member Author

This requires a bit of refactoring — checked and indeterminate should both be inspected in the same change event handler, but at the moment element bindings are dealt with one at a time, making that impossible.

@Rich-Harris
Copy link
Member Author

This is quite a substantial PR, and I'm not completely happy with it — there's still lots of awkward special cases. But I think it's a bit nicer than what we had before, and more importantly it allows us to deal with multiple bindings in a single handler. So the change event on an <input type='checkbox'> updates both checked and indeterminate, and likewise for media elements with currentTime and played bindings, or buffered and seekable.

It also tidies a couple of other things up, such as moving some <select> handling into helper functions.

I think it's probably mergeable, though there might be some remaining opportunities to neaten things up a bit.

@Rich-Harris Rich-Harris changed the title [WIP] failing test for #910 Multiple bindings in a single event handler Nov 20, 2017
@Rich-Harris Rich-Harris merged commit 7758667 into master Nov 21, 2017
@Rich-Harris Rich-Harris deleted the gh-910 branch November 21, 2017 16:09
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