diff --git a/polymer-home-page.html b/polymer-home-page.html
index 106fd65..74225ba 100644
--- a/polymer-home-page.html
+++ b/polymer-home-page.html
@@ -491,7 +491,16 @@
return n && (n[0] === 'o') && (n[1] === 'n') && (n[2] === '-');
},
removeEventPrefix: function(n) {
- return n.slice(prefixLength);
+ var suffix = n.slice(prefixLength);
+ return events.event_translations[suffix] || suffix;
+ },
+ event_translations: {
+ webkitanimationstart: 'webkitAnimationStart',
+ webkitanimationend: 'webkitAnimationEnd',
+ webkittransitionend: 'webkitTransitionEnd',
+ domfocusout: 'DOMFocusOut',
+ domfocusin: 'DOMFocusIn',
+ dommousescroll: 'DOMMouseScroll'
},
// event listeners on host
addHostListeners: function() {
@@ -1756,19 +1765,14 @@
for (var i=0, a; a=this.attributes[i]; i++) {
// does it have magic marker identifying it as an event delegate?
if (api.hasEventPrefix(a.name)) {
- // if so, add the info to delegates
- delegates[api.removeEventPrefix(a.name)] = a.value.replace('{{', '')
- .replace('}}', '').trim();
+ // extract the event name
+ var event = api.removeEventPrefix(a.name);
+ // extract the delegate name
+ var delegate = a.value.replace('{{', '').replace('}}', '').trim();
+ // add the info to delegates
+ delegates[event] = delegate;
}
}
- },
- event_translations: {
- webkitanimationstart: 'webkitAnimationStart',
- webkitanimationend: 'webkitAnimationEnd',
- webkittransitionend: 'webkitTransitionEnd',
- domfocusout: 'DOMFocusOut',
- domfocusin: 'DOMFocusIn',
- dommousescroll: 'DOMMouseScroll'
}
};
@@ -4248,7 +4252,7 @@
license that can be found in the LICENSE file.
-->
-
@@ -5256,37 +5260,6 @@
-
-
-
-
-
-
-
-
-
/g) || [];
- var js_matches = text.match(/\/\*\*([\s\S]*?)\*\//g) || [];
-
var top = {};
var classes = [];
var current = top;
@@ -5659,8 +5638,14 @@
p.push(content);
}
- js_matches.forEach(function(m) {
- var lines = m.replace(/\r\n/g, '\n').replace(/^\s*\/\*\*|^\s*\*\/|^\s*\*/gm, '').split('\n');
+ var js_matches = text.match(/\/\*\*([\s\S]*?)\*\//g) || [];
+ text = text.replace(/\/\*\*([\s\S]*?)\*\//g, '');
+ var html_matches = text.match(//g) || [];
+ var matches = html_matches.concat(js_matches);
+
+ matches.forEach(function(m) {
+
+ var lines = m.replace(/\r\n/g, '\n').replace(/^\s*\/\*\*|^\s*\*\/|^\s*\*|^\s*\<\!-\-|^s*\-\-\>/gm, '').split('\n');
var pragmas = [];
lines = lines.filter(function(l) {
@@ -5670,7 +5655,8 @@
}
pragmas.push(m);
});
- code = lines.join('\n');
+
+ var code = lines.join('\n');
pragmas.forEach(function(m) {
var pragma = m[1], content = m[2];
@@ -5709,16 +5695,46 @@
this.data = { classes : classes };
},
+
dataChanged: function() {
this.fire('data-ready');
}
+
});
+
+
-
+
+
+
+
+
@@ -5730,12 +5746,26 @@
+
+
+
+
+
@@ -6009,24 +6039,32 @@
+
+