Not Able to Show HTML of Element in Console

18 views
Skip to first unread message

Kevin Elrod

unread,
Nov 7, 2016, 11:17:12 AM11/7/16
to Google Chrome Developer Tools




Greetings,

When selecting an element from the console the tool used to show the html of the element.  Now it is showing the javascript properties.  How can I configure the tool to show the HTML by default?  Example image below:


PhistucK

unread,
Nov 7, 2016, 11:21:48 AM11/7/16
to Google Chrome Developer Tools
That might be a bug. You can report it at crbug.com (if you have not found a similar issue already).

For a workaround, use -
dirxml($("#workgroups"))


PhistucK

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-developer-tools+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/1b2992fb-b291-47b2-ad51-4d7046b3ce8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Erik Luo

unread,
Nov 7, 2016, 1:29:19 PM11/7/16
to Google Chrome Developer Tools
Hello,

There was a recent change introduced to make DOM elements not expandable when inside an array.  As a result, any node inside an array will not display its XML format, so HTML and the node's children won't be visible.

You can still do: $('#workgroups')[0] in your example to see the element's XML format.  Alternatively, clicking a node in an expanded object switches you to the Elements panel.  As PhistucK said, dirxml() will show XML format for array entries, but this was also changed in Canary.  The motivation behind these changes is to avoid weird layouts in the console caused by nested expansion arrows.

If these changes have made your workflow worse, please let us know here


Starring bugs and commenting about your use case / workflow would be really appreciated.
Reply all
Reply to author
Forward
0 new messages