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

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

Issue 705683002: fix file-browser (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/file-browser.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/TemplateBinding.sky
diff --git a/sky/framework/sky-element/TemplateBinding.sky b/sky/framework/sky-element/TemplateBinding.sky
index 7f0a9041e3f06ad88c7f845b522ef06c6ba028e7..65d9bb5d3667a33e59b649ff83040507f8130be1 100644
--- a/sky/framework/sky-element/TemplateBinding.sky
+++ b/sky/framework/sky-element/TemplateBinding.sky
@@ -57,8 +57,15 @@ function attributeBinding(el, name) {
};
}
+function bindAsAttribute(el, name) {
+ if (name == 'style' || name == 'class')
+ return true;
+ if (el.tagName == 'a' && name == 'href')
+ return true;
+}
+
Element.prototype.bind = function(name, value, oneTime) {
- if (name !== 'style' && name !== 'class')
+ if (!bindAsAttribute(this, name))
return Node.prototype.bind.call(this, name, value, oneTime);
if (oneTime)
@@ -121,7 +128,7 @@ var templateAttributeDirectives = {
function isTemplate(el) {
if (el.isTemplate_ === undefined)
- el.isTemplate_ = el.tagName == 'TEMPLATE';
+ el.isTemplate_ = el.tagName == 'template';
return el.isTemplate_;
}
« no previous file with comments | « sky/examples/file-browser.sky ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698