Index: tools/dom/templates/html/impl/impl_Element.darttemplate |
diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate |
index fdcd296d131a1b77b08238b1058c457ae9b4c9cd..6f5ae1b2cb8c68f4074eba8b89d93f64ab0d8b46 100644 |
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate |
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate |
@@ -1328,6 +1328,12 @@ $endif |
if (_parseDocument == null) { |
_parseDocument = document.implementation.createHtmlDocument(''); |
_parseRange = _parseDocument.createRange(); |
+ |
+ // Workaround for Safari bug. Was also previously Chrome bug 229142 |
+ // - URIs are not resolved in new doc. |
+ var base = _parseDocument.createElement('base'); |
+ base.href = document.baseUri; |
+ _parseDocument.head.append(base); |
} |
var contextElement; |
if (this is BodyElement) { |