Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Issue 355133002: switch Node.bind to interop (Closed)

Created:
6 years, 6 months ago by Jennifer Messerly
Modified:
6 years, 5 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Switch Node.bind to interop. This allows JS elements to work properly 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 https://github.com/Polymer/ShadowDOM/pull/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). R=sigmund@google.com Committed: https://code.google.com/p/dart/source/detail?r=38051

Patch Set 1 : #

Total comments: 32

Patch Set 2 : #

Patch Set 3 : revert pubspec #

Patch Set 4 : #

Total comments: 1

Patch Set 5 : #

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+427 lines, -545 lines) Patch
M pkg/observe/lib/src/bindable.dart View 1 2 3 4 5 2 chunks +11 lines, -6 lines 0 comments Download
M pkg/observe/lib/src/observer_transform.dart View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M pkg/observe/lib/src/path_observer.dart View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M pkg/observe/pubspec.yaml View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M pkg/observe/test/path_observer_test.dart View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M pkg/pkgbuild.status View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M pkg/polymer/pubspec.yaml View 1 2 3 4 5 2 chunks +4 lines, -4 lines 0 comments Download
M pkg/polymer/test/js_interop_test.dart View 1 2 3 4 5 3 chunks +71 lines, -2 lines 0 comments Download
M pkg/polymer/test/js_interop_test.html View 1 2 3 4 5 1 chunk +54 lines, -0 lines 0 comments Download
M pkg/polymer_expressions/lib/polymer_expressions.dart View 1 2 3 4 5 4 chunks +38 lines, -6 lines 0 comments Download
M pkg/polymer_expressions/pubspec.yaml View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M pkg/polymer_expressions/test/bindings_test.dart View 1 2 3 4 5 3 chunks +5 lines, -5 lines 0 comments Download
A + pkg/polymer_expressions/test/bindings_test.html View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
A + pkg/polymer_expressions/test/globals_test.html View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
A + pkg/polymer_expressions/test/syntax_test.html View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/template_binding/CHANGELOG.md View 1 2 3 4 5 1 chunk +8 lines, -1 line 0 comments Download
D pkg/template_binding/lib/src/element.dart View 1 2 3 4 5 1 chunk +0 lines, -71 lines 0 comments Download
D pkg/template_binding/lib/src/input_bindings.dart View 1 2 3 4 5 1 chunk +0 lines, -167 lines 0 comments Download
D pkg/template_binding/lib/src/input_element.dart View 1 2 3 4 5 1 chunk +0 lines, -28 lines 0 comments Download
M pkg/template_binding/lib/src/node.dart View 1 2 3 4 5 3 chunks +124 lines, -28 lines 0 comments Download
D pkg/template_binding/lib/src/select_element.dart View 1 2 3 4 5 1 chunk +0 lines, -30 lines 0 comments Download
M pkg/template_binding/lib/src/template.dart View 1 2 3 4 5 5 chunks +11 lines, -6 lines 0 comments Download
D pkg/template_binding/lib/src/text.dart View 1 2 3 4 5 1 chunk +0 lines, -31 lines 0 comments Download
D pkg/template_binding/lib/src/text_area_element.dart View 1 2 3 4 5 1 chunk +0 lines, -24 lines 0 comments Download
M pkg/template_binding/lib/template_binding.dart View 1 2 3 4 5 4 chunks +11 lines, -24 lines 0 comments Download
M pkg/template_binding/pubspec.yaml View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/template_binding/test/custom_element_bindings_test.dart View 1 2 3 4 5 3 chunks +0 lines, -79 lines 0 comments Download
A + pkg/template_binding/test/node_bind_test.html View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/template_binding/test/template_binding_test.dart View 1 2 3 4 5 6 chunks +18 lines, -6 lines 0 comments Download
A + pkg/template_binding/test/template_binding_test.html View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/web_components/lib/platform.js View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M pkg/web_components/lib/platform.concat.js View 1 2 3 4 5 1 chunk +37 lines, -0 lines 0 comments Download
M pkg/web_components/lib/platform.concat.js.map View 1 2 3 4 5 3 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
Jennifer Messerly
I think this is actually a non-breaking change. Wow.
6 years, 6 months ago (2014-06-27 01:02:50 UTC) #1
Jennifer Messerly
https://codereview.chromium.org/355133002/diff/10001/pkg/template_binding/test/custom_element_bindings_test.dart File pkg/template_binding/test/custom_element_bindings_test.dart (left): https://codereview.chromium.org/355133002/diff/10001/pkg/template_binding/test/custom_element_bindings_test.dart#oldcode78 pkg/template_binding/test/custom_element_bindings_test.dart:78: test('override attribute setter', () { this dates back to ...
6 years, 6 months ago (2014-06-27 01:07:25 UTC) #2
Siggi Cherem (dart-lang)
Very cool! Just minor nits below, and we should problably coordinate the versions before submitting, ...
6 years, 5 months ago (2014-06-27 18:40:53 UTC) #3
Jennifer Messerly
Thanks Siggi. Some questions RE: your comments. Going to hold off submitting. Let me know ...
6 years, 5 months ago (2014-06-27 19:10:04 UTC) #4
Siggi Cherem (dart-lang)
https://codereview.chromium.org/355133002/diff/10001/pkg/observe/lib/src/bindable.dart File pkg/observe/lib/src/bindable.dart (right): https://codereview.chromium.org/355133002/diff/10001/pkg/observe/lib/src/bindable.dart#newcode40 pkg/observe/lib/src/bindable.dart:40: deliver() => null; On 2014/06/27 19:10:04, John Messerly wrote: ...
6 years, 5 months ago (2014-06-27 19:22:45 UTC) #5
Jennifer Messerly
https://codereview.chromium.org/355133002/diff/10001/pkg/observe/lib/src/bindable.dart File pkg/observe/lib/src/bindable.dart (right): https://codereview.chromium.org/355133002/diff/10001/pkg/observe/lib/src/bindable.dart#newcode40 pkg/observe/lib/src/bindable.dart:40: deliver() => null; On 2014/06/27 19:22:45, Siggi Cherem (dart-lang) ...
6 years, 5 months ago (2014-06-27 21:03:37 UTC) #6
Jennifer Messerly
On 2014/06/27 21:03:37, John Messerly wrote: > https://codereview.chromium.org/355133002/diff/10001/pkg/observe/lib/src/bindable.dart > File pkg/observe/lib/src/bindable.dart (right): > > https://codereview.chromium.org/355133002/diff/10001/pkg/observe/lib/src/bindable.dart#newcode40 ...
6 years, 5 months ago (2014-07-02 22:38:10 UTC) #7
Jennifer Messerly
Siggi, would you mind taking another look? Specifically at patch set #4 This now has ...
6 years, 5 months ago (2014-07-07 02:36:04 UTC) #8
Siggi Cherem (dart-lang)
lgtm the failing test in polymer_expressions is indeed puzzling, but I agree, let's submit this ...
6 years, 5 months ago (2014-07-07 19:41:14 UTC) #9
Jennifer Messerly
6 years, 5 months ago (2014-07-08 04:57:50 UTC) #10
Message was sent while issue was closed.
Committed patchset #6 manually as r38051 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698