Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
remove unused code in fixTemplateElementPrototype
Browse files Browse the repository at this point in the history
we no longer attempt to fix the prototype of a semantic template element. instead, we "extract" an actual template element.

the invariant with this method is that it is always called with an element with tagName 'template' in the HTML namespace.

R=arv
BUG=

Review URL: https://codereview.appspot.com/52430043
  • Loading branch information
rafaelw committed Jan 15, 2014
1 parent 5c5109f commit 0e9ac94
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/TemplateBinding.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,21 +357,10 @@
}

function fixTemplateElementPrototype(el) {
// Note: because we need to treat some semantic elements as template
// elements (like tr or td), but don't want to reassign their proto (gecko
// doesn't like that), we mixin the properties for those elements.
if (el.tagName === 'TEMPLATE') {
if (!hasTemplateElement) {
if (hasProto)
el.__proto__ = HTMLTemplateElement.prototype;
else
mixin(el, HTMLTemplateElement.prototype);
}
} else {
if (hasProto)
el.__proto__ = HTMLTemplateElement.prototype;
else
mixin(el, HTMLTemplateElement.prototype);
// FIXME: Won't need this when webkit methods move to the prototype.
Object.defineProperty(el, 'content', contentDescriptor);
}
}

function ensureSetModelScheduled(template) {
Expand Down

0 comments on commit 0e9ac94

Please sign in to comment.