WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
Bug 32082
Show DOM information as firebug console does
https://bugs.webkit.org/show_bug.cgi?id=32082
Summary
Show DOM information as firebug console does
Cliff
Reported
2009-12-02 12:15:21 PST
In the firebug console, the DOM tab has several options that can be enabled. One of them is 'Show user-defined properties'. This is incredibly useful, because you can tell at a glance what javascript objects and properties are available for you to use, which is a common task in today's world of mashups and integrations. Is this info available somewhere in Web Inspector? I don't really care if it looks like firebug or not, I would just like a convenient place to get the information. As an example, go to
http://drupal.org
in firefox and open firebug. Click on the DOM label, and if you have 'Show user-defined properties' set, you will see a top-level 'Drupal' object defined. Browsing through it you can see all the properties and objects that are available that you may need to use when integrating a third-party javascript on a drupal site. It would be great if that same functionality were somewhere in Web Inspector. thanks, Cliff
Attachments
Add attachment
proposed patch, testcase, etc.
Timothy Hatcher
Comment 1
2009-12-04 09:30:17 PST
We show you DOM properties for the selected DOM element. But we don't have access to the Window or Document object. We need to fix that.
Timothy Hatcher
Comment 2
2009-12-04 09:33:44 PST
One idea Sam had a while back was to show Window and Document in the element tree, at the root level with a divider then the DOM elements. This would avoid nesting the whole DOM tree and give these objects a special status. We would do this for iframes too, have the Window and Document inside the iframe element decorated in some way to disinguish them and have the regualr dom elements.
Cliff
Comment 3
2009-12-04 09:45:10 PST
That sounds like it might be ok. Having them nested in the element tree would be a nightmare though. I'm kinda a newbie to DOM in general though so I get confused about distinctions between DOM elements, Window, Document, etc. (In reply to
comment #2
)
> One idea Sam had a while back was to show Window and Document in the element > tree, at the root level with a divider then the DOM elements. This would avoid > nesting the whole DOM tree and give these objects a special status. > > We would do this for iframes too, have the Window and Document inside the > iframe element decorated in some way to disinguish them and have the regualr > dom elements.
Timothy Hatcher
Comment 4
2009-12-04 10:56:51 PST
The Window and Document would not be nested. They would be seperate with some decoration distinguishing them.
Pavel Feldman
Comment 5
2009-12-04 12:38:37 PST
Why loading UI with those, is dumping 'window' or 'document' in console and learning 'Drupal's properties not enough?
Timothy Hatcher
Comment 6
2009-12-04 12:44:59 PST
Pavel, it would be useful to see the event listeners, and the prototype segregated properties.
Cliff
Comment 7
2009-12-04 12:54:19 PST
It's not merely an issue of reading Drupal docs to understand their properties. It's a top level object that many contributed modules use to store config information, and since Drupal is built around many modules, you ould potentially have 40 different modules, all with varying levels of documentation about what javascript variables they are setting, that it would help to just have a handy browser. Firebug does this extremely well and it doesn't pollute or clutter the ui as far as i can tell. They separate it from the elements browser as a separate tab. Beside the Drupal object, there may be other libraries added, all of which have a hierarchy of objects, properties, and functions. Just browsing my homepage, which is a typical drupal install, I see (with firebug) objects defined for Drupal, lightbox, jquery, addthis, tinymce, etc, etc. But I am interested in your suggestion of 'dumping window in console'. Can you tell me how to do that?
Timothy Hatcher
Comment 8
2009-12-04 13:00:00 PST
Just type "window" with no quotes in the Console and hit return. Then expand the object to browse the properties.
Cliff
Comment 9
2009-12-04 13:06:29 PST
Awesome! thanks. I still think it would be nice to have it as a selectable ui element somewhere (unobtrusive of course). But as I said in the original bug report "I don't really care if it looks like firebug or not, I would just like a convenient place to get the information". Dumping the variable is an acceptable work around. If you decide to move forward with implementing it as a UI element, that would be great, but I'm happy for you close the bug otherwise since I now know where to get the info. (In reply to
comment #8
)
> Just type "window" with no quotes in the Console and hit return. Then expand > the object to browse the properties.
Brian Burg
Comment 10
2014-12-12 14:08:11 PST
Closing as invalid, as this bug pertains to the old inspector UI and/or its tests. Please file a new bug (
https://www.webkit.org/new-inspector-bug
) if the bug/feature/issue is still relevant to WebKit trunk.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug