Bug 583041 - Style Editor integration; sourceeditor fix; r=rcampbell,msucan

This commit is contained in:
Cedric Vivier 2011-10-03 19:08:15 +08:00
parent bd63118508
commit bab469f053

View File

@ -222,7 +222,17 @@ SourceEditor.prototype = {
}, this); }, this);
if (aCallback) { if (aCallback) {
aCallback(this); let iframe = this._view._frame;
let document = iframe.contentDocument;
if (!document || document.readyState != "complete") {
let onIframeLoad = function () {
iframe.contentWindow.removeEventListener("load", onIframeLoad, false);
aCallback(this);
}.bind(this);
iframe.contentWindow.addEventListener("load", onIframeLoad, false);
} else {
aCallback(this);
}
} }
}, },