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

Unified Diff: sky/examples/htmlish/framework/element.sky

Issue 836153005: Specs: registerElement(registerElement(...)) failed to work as expected (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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/examples/calculator/buttons.sky ('k') | sky/examples/radio.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/htmlish/framework/element.sky
diff --git a/sky/examples/htmlish/framework/element.sky b/sky/examples/htmlish/framework/element.sky
index 89b4c2d0f74877e8791f1964f590a107ea0f5361..d2c1d1c1277dd4a1ec5e0f5b8f8e58eddd15f917 100644
--- a/sky/examples/htmlish/framework/element.sky
+++ b/sky/examples/htmlish/framework/element.sky
@@ -19,9 +19,9 @@ SKY MODULE - defines an <element> element
-->
<script>
- module.exports.Element = sky.registerElement({
- tagName: 'element',
- constructor: class extends Element {
+ module.exports.Element = sky.registerElement(
+ class extends Element {
+ static get tagName() { return 'element'; }
constructor (module) {
super();
this.state = 'loading';
@@ -58,15 +58,13 @@ SKY MODULE - defines an <element> element
constructor.prototype = this.definedPrototype;
else
constructor.prototype = sky.Element;
- this.module.exports[constructorName] = this.registerElement({
- tagName: this.getAttribute('name'),
- shadow: style || template,
- constructor: constructor,
- });
+ constructor.tagName = this.getAttribute('name');
+ constructor.shadow = style || template;
+ this.module.exports[constructorName] = this.registerElement(constructor);
delete this.definedPrototype;
delete this.module;
this.state = 'loaded';
}
- },
- });
+ }
+ );
</script>
« no previous file with comments | « sky/examples/calculator/buttons.sky ('k') | sky/examples/radio.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698