Inspect "window" object: correctly ensure tree loaded
(needed for not yet loaded web pages)