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

Issue 812713005: Add declarataive event handlers. (Closed)

Created:
6 years ago by esprehn
Modified:
6 years ago
Reviewers:
eseidel1, rafaelw, eseidel
CC:
abarth-chromium, mojo-reviews_chromium.org, ojan
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Add declarataive event handlers. Now inside the <template> of a SkyElement you can use on-eventName="method" on any element to add event listeners. For example you can write <sky-button on-click="handleClick"> and then define handleClick(event) on the element class that contains the button. In adding this and tests I also realized that property bindings were not setup on the initial call to bind(), which is now fixed in this patch (See change to Node.prototype.bind). R=eseidel@google.com, rafaelw@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/0d853ab5c4ab9ea55dc9bd35164c0be292dae2a5

Patch Set 1 #

Patch Set 2 : Add tests and fix binding #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -2 lines) Patch
M sky/examples/widgets/index.sky View 2 chunks +6 lines, -1 line 0 comments Download
M sky/framework/sky-element/TemplateBinding.sky View 1 4 chunks +24 lines, -1 line 0 comments Download
A sky/tests/framework/templates.sky View 1 1 chunk +54 lines, -0 lines 0 comments Download
A sky/tests/framework/templates-expected.txt View 1 1 chunk +7 lines, -0 lines 0 comments Download
A sky/tests/resources/test-element.sky View 1 1 chunk +23 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
esprehn
6 years ago (2014-12-19 09:13:18 UTC) #2
eseidel1
Can we test this in an automated fashion? otherwise lgtm
6 years ago (2014-12-19 17:41:08 UTC) #4
esprehn
On 2014/12/19 at 17:41:08, eseidel wrote: > Can we test this in an automated fashion? ...
6 years ago (2014-12-19 21:04:16 UTC) #5
rafaelw
lgtm
6 years ago (2014-12-19 21:06:55 UTC) #6
esprehn
6 years ago (2014-12-19 21:10:20 UTC) #7
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
0d853ab5c4ab9ea55dc9bd35164c0be292dae2a5 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698