0

I'd like to do this in Chrome Developer Tools, but I'd take anything at this point.

The question

If I know I am looking for a specific object, how can I search the entire JS hierarchy to find it?

The situation

In know from my time on irc://irc.freenode.net/bash that when people reduce their question to what they think they should do, they waste a lot of time.

I use Confluence Cloud and their WYSIWYG is terrible. Because it is TinyMCE, I can get a lot done by editing the DOM in the Chrome Developer Tools. I ought to be able to hack the JS object and get even more through. But, the first step is the find the TinyMCE.settings object.

Bruno Bronosky
  • 66,273
  • 12
  • 162
  • 149
  • Try [How to search the browser window object looking which object or variable has the searched-for value?](//stackoverflow.com/a/46536947) – wOxxOm Nov 06 '17 at 05:23
  • Thanks, that's a pretty good lead. What I actually need is to search based on object name rather than value. I'll try to convert that over, but I'm going to leave this open until I do. – Bruno Bronosky Nov 06 '17 at 14:29

1 Answers1

0

If you've got a reference to the object's constructor, the queryObjects() API might be able to help you locate the object. You might need to set a breakpoint and pause the code at a point where you know that the object still exists in the heap.

Check what version of Chrome you're using at chrome://version. queryObjects() was introduced in Chrome 62, which should be hitting Stable right about now but you might not have it quite yet.

Kayce Basques
  • 23,849
  • 11
  • 86
  • 120