This repository has been archived by the owner on Mar 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
fix form.elements -- this is used by NodeBind getAssociatedRadioButtons #462
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hey, @arv do you mind taking a look? I patterned it after similar wrappers like HTMLTableRowElement. All tests pass after this change. |
var registerWrapper = scope.registerWrapper; | ||
var wrapHTMLCollection = scope.wrapHTMLCollection; | ||
var unwrap = scope.unwrap; | ||
var wrap = scope.wrap; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like you are using wrap
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch. fixed!
LGTM HTMLFormControlsCollection is one of the worst abominations of the DOM APIs. It has named interceptors too and sometimes these return an element and sometime another collection. Hopefully we do not have to ever implement that. |
jmesserly
pushed a commit
that referenced
this pull request
Jun 27, 2014
fix form.elements -- this is used by NodeBind getAssociatedRadioButtons
svn2github
pushed a commit
to svn2github/dart-lang
that referenced
this pull request
Jul 15, 2014
… with Dart binding paths for things that are not JSON serializable. Two big things this enables: * elements themselves can be data bound * anything jsify can handle, including Dart functions. This means as we get @export and such, it will be possible to bind those Dart types directly into JS elements. With that we can make things like <core-style> much nicer to use. This also removes ported code from https://github.com/Polymer/NodeBind except for interfaces, since we don't need it anymore. Added a Polymer test to verify it works for the typical end-to-end case. This uncovered the "deliver" method that needs to be there on Bindable. Finally one Node.bind test depends on googlearchive/ShadowDOM#462, which fixes an issue where SD polyfill doesn't wrap an API used by Node.bind. Apparently no one has ever hit this on the JS side (the Dart port was immune, because our treatment of HTMLCollection is better). [email protected] Review URL: https://codereview.chromium.org//355133002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@38051 260f80e4-7a28-3924-810f-c04153c831b5
jmesserly
pushed a commit
to dart-archive/polymer-dart
that referenced
this pull request
Dec 20, 2014
… with Dart binding paths for things that are not JSON serializable. Two big things this enables: * elements themselves can be data bound * anything jsify can handle, including Dart functions. This means as we get @export and such, it will be possible to bind those Dart types directly into JS elements. With that we can make things like <core-style> much nicer to use. This also removes ported code from https://github.com/Polymer/NodeBind except for interfaces, since we don't need it anymore. Added a Polymer test to verify it works for the typical end-to-end case. This uncovered the "deliver" method that needs to be there on Bindable. Finally one Node.bind test depends on googlearchive/ShadowDOM#462, which fixes an issue where SD polyfill doesn't wrap an API used by Node.bind. Apparently no one has ever hit this on the JS side (the Dart port was immune, because our treatment of HTMLCollection is better). [email protected] Review URL: https://codereview.chromium.org//355133002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/polymer@38051 260f80e4-7a28-3924-810f-c04153c831b5
jmesserly
pushed a commit
to dart-archive/observe
that referenced
this pull request
Dec 20, 2014
… with Dart binding paths for things that are not JSON serializable. Two big things this enables: * elements themselves can be data bound * anything jsify can handle, including Dart functions. This means as we get @export and such, it will be possible to bind those Dart types directly into JS elements. With that we can make things like <core-style> much nicer to use. This also removes ported code from https://github.com/Polymer/NodeBind except for interfaces, since we don't need it anymore. Added a Polymer test to verify it works for the typical end-to-end case. This uncovered the "deliver" method that needs to be there on Bindable. Finally one Node.bind test depends on googlearchive/ShadowDOM#462, which fixes an issue where SD polyfill doesn't wrap an API used by Node.bind. Apparently no one has ever hit this on the JS side (the Dart port was immune, because our treatment of HTMLCollection is better). [email protected] Review URL: https://codereview.chromium.org//355133002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/observe@38051 260f80e4-7a28-3924-810f-c04153c831b5
jmesserly
pushed a commit
to dart-archive/polymer-expressions
that referenced
this pull request
Dec 20, 2014
… with Dart binding paths for things that are not JSON serializable. Two big things this enables: * elements themselves can be data bound * anything jsify can handle, including Dart functions. This means as we get @export and such, it will be possible to bind those Dart types directly into JS elements. With that we can make things like <core-style> much nicer to use. This also removes ported code from https://github.com/Polymer/NodeBind except for interfaces, since we don't need it anymore. Added a Polymer test to verify it works for the typical end-to-end case. This uncovered the "deliver" method that needs to be there on Bindable. Finally one Node.bind test depends on googlearchive/ShadowDOM#462, which fixes an issue where SD polyfill doesn't wrap an API used by Node.bind. Apparently no one has ever hit this on the JS side (the Dart port was immune, because our treatment of HTMLCollection is better). [email protected] Review URL: https://codereview.chromium.org//355133002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/polymer_expressions@38051 260f80e4-7a28-3924-810f-c04153c831b5
jmesserly
pushed a commit
to dart-archive/template-binding
that referenced
this pull request
Dec 20, 2014
… with Dart binding paths for things that are not JSON serializable. Two big things this enables: * elements themselves can be data bound * anything jsify can handle, including Dart functions. This means as we get @export and such, it will be possible to bind those Dart types directly into JS elements. With that we can make things like <core-style> much nicer to use. This also removes ported code from https://github.com/Polymer/NodeBind except for interfaces, since we don't need it anymore. Added a Polymer test to verify it works for the typical end-to-end case. This uncovered the "deliver" method that needs to be there on Bindable. Finally one Node.bind test depends on googlearchive/ShadowDOM#462, which fixes an issue where SD polyfill doesn't wrap an API used by Node.bind. Apparently no one has ever hit this on the JS side (the Dart port was immune, because our treatment of HTMLCollection is better). [email protected] Review URL: https://codereview.chromium.org//355133002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/template_binding@38051 260f80e4-7a28-3924-810f-c04153c831b5
jmesserly
pushed a commit
to dart-archive/web-components
that referenced
this pull request
Dec 20, 2014
… with Dart binding paths for things that are not JSON serializable. Two big things this enables: * elements themselves can be data bound * anything jsify can handle, including Dart functions. This means as we get @export and such, it will be possible to bind those Dart types directly into JS elements. With that we can make things like <core-style> much nicer to use. This also removes ported code from https://github.com/Polymer/NodeBind except for interfaces, since we don't need it anymore. Added a Polymer test to verify it works for the typical end-to-end case. This uncovered the "deliver" method that needs to be there on Bindable. Finally one Node.bind test depends on googlearchive/ShadowDOM#462, which fixes an issue where SD polyfill doesn't wrap an API used by Node.bind. Apparently no one has ever hit this on the JS side (the Dart port was immune, because our treatment of HTMLCollection is better). [email protected] Review URL: https://codereview.chromium.org//355133002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/web_components@38051 260f80e4-7a28-3924-810f-c04153c831b5
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
form.elements should return an HTMLCollection.
this code in NodeBind.js
...uses form.elements, which was returning unwrapped nodes under SD polyfill. This later causes an error because Node.bind stores bindings_ on the wrapper, and when it doesn't find the data it stored, blows up with a TypeError.
Caught this by running NodeBind tests with platform.js (normally they don't run with SD polyfill -- maybe they should?)