Index: sdk/lib/html/dartium/html_dartium.dart |
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart |
index 6615ea2212b7b0045a2339b61838f994c7a47169..4e7a0f2f19fefd49029f32517c7016b3e668476c 100644 |
--- a/sdk/lib/html/dartium/html_dartium.dart |
+++ b/sdk/lib/html/dartium/html_dartium.dart |
@@ -25440,7 +25440,7 @@ class TemplateElement extends HtmlElement { |
} |
if (!isNative) { |
- var doc = _getTemplateContentsOwner(templateElement.document); |
+ var doc = _getTemplateContentsOwner(templateElement.ownerDocument); |
templateElement._templateContent = doc.createDocumentFragment(); |
} |
@@ -25489,7 +25489,7 @@ class TemplateElement extends HtmlElement { |
// + <td>Bar</td> |
// |
static Element _extractTemplateFromAttributeTemplate(Element el) { |
- var template = el.document.createElement('template'); |
+ var template = el.ownerDocument.createElement('template'); |
el.parentNode.insertBefore(template, el); |
for (var name in el.attributes.keys.toList()) { |