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

Side by Side Diff: third_party/polymer/components-chromium/paper-checkbox/paper-checkbox-extracted.js

Issue 592593002: Inline scripts were extracted from Polymer elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/echo ""/echo/ Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1
2
3 Polymer('paper-checkbox', {
4
5 /**
6 * Fired when the checked state changes.
7 *
8 * @event change
9 */
10
11 toggles: true,
12
13 checkedChanged: function() {
14 var cl = this.$.checkbox.classList;
15 cl.toggle('checked', this.checked);
16 cl.toggle('unchecked', !this.checked);
17 cl.toggle('checkmark', !this.checked);
18 cl.toggle('box', this.checked);
19 this.setAttribute('aria-checked', this.checked ? 'true': 'false');
20 this.fire('change');
21 },
22
23 checkboxAnimationEnd: function() {
24 var cl = this.$.checkbox.classList;
25 cl.toggle('checkmark', this.checked && !cl.contains('checkmark'));
26 cl.toggle('box', !this.checked && !cl.contains('box'));
27 }
28
29 });
30
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698