fix(browser_adapter): HTMLStyleElement.innerText does not trigger creation of CSS rules (Firefox)

This commit is contained in:
Marc Laval 2015-05-21 17:09:48 +02:00
parent 661a04798e
commit b2a24e021f
1 changed files with 2 additions and 2 deletions

View File

@ -192,8 +192,8 @@ createScriptTag(attrName: string, attrValue: string, doc = document): HTMLScript
return el; return el;
} }
createStyleElement(css: string, doc = document): HTMLStyleElement { createStyleElement(css: string, doc = document): HTMLStyleElement {
var style = <HTMLStyleElement>doc.createElement('STYLE'); var style = <HTMLStyleElement>doc.createElement('style');
style.innerText = css; this.appendChild(style, this.createTextNode(css));
return style; return style;
} }
createShadowRoot(el: HTMLElement): DocumentFragment { createShadowRoot(el: HTMLElement): DocumentFragment {