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

Unified Diff: sky/framework/sky-radio/sky-radio.sky

Issue 845283003: Allow on-* event handlers on <sky-element>. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: s p a c i n g Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/framework/sky-element/sky-element.sky ('k') | sky/tests/framework/templates.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/sky-radio/sky-radio.sky
diff --git a/sky/framework/sky-radio/sky-radio.sky b/sky/framework/sky-radio/sky-radio.sky
index 7b759d5e954cb21deab75ca0d75d8fb747bf6391..011f0d3f745593461803f560936b2451bc21aaf7 100644
--- a/sky/framework/sky-radio/sky-radio.sky
+++ b/sky/framework/sky-radio/sky-radio.sky
@@ -5,7 +5,10 @@
-->
<import src="/sky/framework/sky-button/sky-button.sky" as="SkyButton" />
-<sky-element name="sky-radio" attributes="selected:boolean, group:string">
+<sky-element
+ name="sky-radio"
+ attributes="selected:boolean, group:string"
+ on-mouseup="handleMouseUp">
<template>
<style>
:host {
@@ -75,10 +78,6 @@ module.exports = class extends SkyButton {
super.created();
this.controller = null;
-
- this.addEventListener('mouseup', function() {
- this.selected = true;
- });
}
attached() {
super.attached();
@@ -98,6 +97,9 @@ module.exports = class extends SkyButton {
if (this.selected && this.controller)
this.controller.takeSelectionFromGroup(this);
}
+ handleMouseUp() {
+ this.selected = true;
+ }
}.register();
</script>
</sky-element>
« no previous file with comments | « sky/framework/sky-element/sky-element.sky ('k') | sky/tests/framework/templates.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698