News for hackers. Stuff that matters.
Re:No to Chrome by brianzelip on Friday December 06, 2019 @09:43AM (#21722135)
Does anyone know the Firefox dev tools equivalent of Chrome dev tools "JavaScript contexts" drop down menu? I'm not sure how to describe it, but here are two screenshots from a tutorial where I saw it:

1. With mouse hovering over the drop down menu showing the displayed tool tip

https://imgur.com/a/16lCRWg

2. With clicked on drop down menu showing the "javascript contexts"

https://imgur.com/a/SPZuvWr

Re:No to Chrome by digitarald on Friday December 06, 2019 @09:55AM (#21722247)
DevTools member here: We have a more powerful target switching (hidden) in the toolbar but are also working to better expose JS context switching early next year.

Debugger's new threads panel also solves this partially when you pause in a thread.

Are your use cases extensions, workers or iframes?

Re:No to Chrome by brianzelip on Friday December 06, 2019 @10:49AM (#21722812)
Thanks for all of your team's work! It's a critical tool that I love and use often.

My use case is more of, I saw something in the chrome tools that I didn't recognize from FF. I don't do much js debugging beyond console logging. But I'm starting a PWA project and will be making a service worker, so sounds like this functionality might be relevant.

ps - enjoyed this Changelog podcast w/ Jason Laster of the FF DevTools team, https://changelog.com/podcast/247.

Re:No to Chrome by sombremesa on Friday December 06, 2019 @09:49AM (#21722185)
This button on the top right is the closest you get, I think:

https://puu.sh/EMtaR/0f9c88cbd9.png

Re:No to Chrome by brianzelip on Friday December 06, 2019 @09:47AM (#21722168)
Oh, by "js contexts" do they mean "all the javascripts related to the page?" If so, then I guess this file tree-like explorer of js is the Firefox equivalent?

https://imgur.com/a/YvA9Hdw

Re:No to Chrome by playpause on Friday December 06, 2019 @10:15AM (#21722461)
No, each context can contain multiple scripts. Each browser tab has a single top-level context called 'top', plus it will have extra contexts for any frames or iframes within the page, as well as for any browser extensions running on the page.

Only script elements in the HTML of the top-level page (i.e. in the HTML served directly from the URL you see in the location bar) get to be in the 'top' context.