Bug 432702: don't throw when loading XUL pages, r=mfinkle

This commit is contained in:
Gavin Sharp 2008-07-24 15:50:59 -04:00
parent f26851ca68
commit ddf985d191

View File

@ -614,7 +614,12 @@
<getter>
var cdoc = this.browser.contentDocument;
// These might not exist yet
// Return the document width/height for XUL documents (which is
// essentially the same as the viewport width/height).
if (cdoc instanceof XULDocument)
return [cdoc.width, cdoc.height];
// These might not exist yet depending on page load state
var body = cdoc.body || {};
var html = cdoc.documentElement || {};