<div dir="ltr"><div>Wow, this is great! I just ran into this problem a week ago and it was quite annoying to work around. Thanks for fixing it. :-)</div><div><br></div><div>bholley<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 3, 2017 at 4:15 PM, Matthew N. <span dir="ltr"><<a href="mailto:MattN@mozilla.com" target="_blank">MattN@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">With bug 1401343 <<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1401343" rel="noreferrer" target="_blank">https://bugzilla.mozilla.org/<wbr>show_bug.cgi?id=1401343</a>><br>
fixed, `TabChildGlobal`s for the attached content process are exposed via a<br>
`tabs` getter in the Browser Content Toolbox's console tab. This makes it<br>
much easier to inspect a remote tab's state or to access privileged APIs<br>
related to remote tab content. The motivation for this change is to make it<br>
less tedious to inspect remote tab state with e10s, especially without<br>
add-on shims/CPOWs.<br>
<br>
For those of you who don't know, when the "devtools.chrome.enabled" pref is<br>
true the Web Developer > Browser Content Toolbox opens a toolbox targeting<br>
the content process that the selected tab is loaded in. From there you can<br>
access `tabs` in the Console tab to get an array of the `TabChildGlobal`s<br>
(which have access to the content Window object via `content`).<br>
<br>
Examples:<br>
1) Access a ChromeOnly property on an element: `tabs[0].content.document.<br>
querySelector("#myEl").<wbr>nodePrincipal`<br>
2) Add an event listener to a tab child:<br>
`tabs[3].addEventListener("<wbr>change", tabs[3].console.log)`<br>
<br>
Bug 1346316 <<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1346316" rel="noreferrer" target="_blank">https://bugzilla.mozilla.org/<wbr>show_bug.cgi?id=1346316</a>> tracks<br>
giving easier access to the selected tab's TabChildGlobal and making the<br>
frame picker work (to more easily change between `TabChildGlobal`s by URL).<br>
<br>
Happy debugging!<br>
Matthew Noorenberghe (:MattN)<br>
______________________________<wbr>_________________<br>
dev-platform mailing list<br>
<a href="mailto:dev-platform@lists.mozilla.org">dev-platform@lists.mozilla.org</a><br>
<a href="https://lists.mozilla.org/listinfo/dev-platform" rel="noreferrer" target="_blank">https://lists.mozilla.org/<wbr>listinfo/dev-platform</a><br>
</blockquote></div><br></div>