mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-27 04:05:32 +00:00
Bug 432702: don't throw when loading XUL pages, r=mfinkle
This commit is contained in:
parent
f26851ca68
commit
ddf985d191
@ -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 || {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user