From 4bcc8af201375024c1972ab38f39b69c755a99e6 Mon Sep 17 00:00:00 2001 From: Trey Shugart Date: Fri, 17 Jun 2016 17:02:22 +1000 Subject: [PATCH] #557 - call rawCreateElement() directly (#561) Fixes #557 - Call rawCreateElement with only .call() instead of .bind() --- src/CustomElements/v1/CustomElements.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CustomElements/v1/CustomElements.js b/src/CustomElements/v1/CustomElements.js index c03917be5..f7fc2dc2e 100644 --- a/src/CustomElements/v1/CustomElements.js +++ b/src/CustomElements/v1/CustomElements.js @@ -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);