Bug 1037446 - [rule view] Adding new rules fails when document.head is undefined. r=harth

This commit is contained in:
Gabriel Luong 2014-07-11 18:02:00 +02:00
parent 94fe55581f
commit c1669f97c9

View File

@ -559,9 +559,9 @@ var PageStyleActor = protocol.ActorClass({
get styleElement() {
if (!this._styleElement) {
let document = this.inspector.window.document;
let style = document.createElement("style");
let style = document.createElementNS("http://www.w3.org/1999/xhtml", "style");
style.setAttribute("type", "text/css");
document.head.appendChild(style);
document.documentElement.appendChild(style);
this._styleElement = style;
}