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

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

Issue 845403009: Turn on harmony arrays and regexp. (Closed) Base URL: git@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/fps-counter.sky ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/sky-element/sky-element.sky
diff --git a/sky/framework/sky-element/sky-element.sky b/sky/framework/sky-element/sky-element.sky
index 7b7933ab35709505eee6b2118c3228a6a28ed7ea..d1dfcbb9b1ff26d1b9b06d2418f2bf11e4558318 100644
--- a/sky/framework/sky-element/sky-element.sky
+++ b/sky/framework/sky-element/sky-element.sky
@@ -77,16 +77,6 @@ class ElementRegistration {
return this.definition.getAttribute('on-' + eventName);
}
- getAttributeNames() {
- // TODO(esprehn): We can replace this method with
- // Array.from(registration.attributes) once we turn that on.
- var names = []
- this.attributes.forEach(function(converter, name) {
- names.push(name);
- });
- return names;
- }
-
synthesizeAttributes(prototype) {
this.attributes.forEach(function(converter, name) {
Object.defineProperty(prototype, name, {
@@ -129,7 +119,7 @@ class SkyElement extends HTMLElement {
// TODO(esprehn): Combine the two element registries here and in sky binder.
binder.registerElement(registration.tagName, {
- attributeNames: registration.getAttributeNames(),
+ attributeNames: Array.from(registration.attributes.keys()),
});
registrations.set(registration.tagName, registration);
« no previous file with comments | « sky/examples/fps-counter.sky ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698