Console.dir (window) in Firefox?

console.dir(window) in Chrome:

http://ecmazing.com/unsorted/console-dir-window-in-chrome.png

console.dir(window) in Firebug (in Firefox 7):

http://ecmazing.com/unsorted/console-dir-window-in-firebug.png

Why does Firebug display only a couple of object properties window? How can I list all global properties in Firefox?

Also, where is the property __proto__so that I can follow the prototype chain?

+5
source share
3 answers

, Firebug , hasOwnProperty. , DOM Firefox 4/Firebug 1.7 navigator addHandler, confirm . :

>>> window.hasOwnProperty('confirm')
false
>>> window.hasOwnProperty('addHandler')
true
>>> window.hasOwnProperty('navigator')
true

Date , :

>>> window.hasOwnProperty('Date')
true

, , , , , -, 9 . , / .

, . , , , , .

+2

, -, / .

DOM dom ( ) firebug 1.9.0b1 ( 1.8 im sure..), .

(I.E. , " " " " ), .

, , , , , , .

, - , , , DOM Firebug.

+1

FireFox console.log(window); DOM , .

Using console.dir(window);instead gives you a snapshot of the properties of the object in the runtime you specify that you requested. If you look, you can click the last instance of the β€œwindow” in your FireFox report console.dir(window);to see the properties associated with the window object during the function call.

0
source

All Articles