Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

Commit

Permalink
#557 - call rawCreateElement() directly (#561)
Browse files Browse the repository at this point in the history
Fixes #557 - Call rawCreateElement with only .call() instead of .bind()
  • Loading branch information
treshugart authored and justinfagnani committed Jun 17, 2016
1 parent 4bd9d43 commit 4bcc8af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CustomElements/v1/CustomElements.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ var CustomElementDefinition;

// patch doc.createElement

var rawCreateElement = doc.createElement.bind(document);
var rawCreateElement = doc.createElement;
doc._createElement = function(tagName, callConstructor) {
var customElements = win['customElements'];
var element = rawCreateElement.call(document, tagName);
var element = rawCreateElement.call(doc, tagName);
var definition = customElements._definitions.get(tagName.toLowerCase());
if (definition) {
customElements._upgradeElement(element, definition, callConstructor);
Expand Down

0 comments on commit 4bcc8af

Please sign in to comment.