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

Commit

Permalink
Revert "revert CustomElements changes"
Browse files Browse the repository at this point in the history
This reverts commit 3ca60a8.
  • Loading branch information
Katochimoto committed Aug 2, 2014
1 parent 3ca60a8 commit 53f7511
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/CustomElements.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@ var hasNative = Boolean(document.registerElement);
// other key related web components features.
var useNative = !flags.register && hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);

if (useNative) {
// FF doesn't store methods and properties after cloning
document.registerElement('check-cloning-element', {
prototype: Object.create(HTMLElement.prototype, {
test: { get: function() { return 1; } }
})
});

if (!document.createElement('check-cloning-element').cloneNode(true).test) {
useNative = false;
}
}

if (useNative) {

// stub
Expand Down

0 comments on commit 53f7511

Please sign in to comment.