File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,17 @@ export class BrowserDomAdapter extends DomAdapter {
234234 return node instanceof HTMLElement && isPresent ( node . shadowRoot ) ;
235235 }
236236 importIntoDoc ( node :Node ) {
237- return document . importNode ( node , true ) ;
237+ var result = document . importNode ( node , true ) ;
238+ // Workaround WebKit https://bugs.webkit.org/show_bug.cgi?id=137619
239+ if ( this . isTemplateElement ( result ) &&
240+ ! result . content . childNodes . length && node . content . childNodes . length ) {
241+ var childNodes = node . content . childNodes ;
242+ for ( var i = 0 ; i < childNodes . length ; ++ i ) {
243+ result . content . appendChild (
244+ this . importIntoDoc ( childNodes [ i ] ) ) ;
245+ }
246+ }
247+ return result ;
238248 }
239249 isPageRule ( rule ) {
240250 return rule . type === CSSRule . PAGE_RULE ;
You can’t perform that action at this time.
0 commit comments