gecko-dev/devtools
Alexandre Poirot 2e4828ee20 Bug 1730154 - [devtools] Create targets for iframes reusing the initial about:blank WindowGlobal. r=nchevobbe
When loading an iframe in the same origin/process, we end up with an edge case.
A first "initial" about:blank document is created to bootstrap the iframe.
A `DOMWindowCreated` event is fired and its `document.isInitialDocument` is true.
If no URL is set on the iframe, it stops there and we won't create any target for this special document.
(As we ignore `DOMWindowCreated` events when `document.isInitialDocument` is true)

Then, if an URL is set on the iframe, we don't create any new WindowGlobal,
instead we will reuse the about:blank's document's one.
It means that there won't be any new DOMWindowCreated event.

Fortunately, there is a `DOMDocElementInserted` fired, which we can listen here.
We can then instantiate a target actor and that, only if no target was previously created
by a previous `DOMWindowCreated`. In all other cases, we would receive a `DOMWindowCreated`
with `document.isInitialDocument` set to false.

Differential Revision: https://phabricator.services.mozilla.com/D128456
2021-11-03 17:40:25 +00:00
..
client Bug 1738124 - [devtools] Fix browser_webconsole_location_styleeditor_link.js intermittent. r=bomsy. 2021-11-03 16:01:58 +00:00
docs Bug 1737573 - [devtools] Migrate MDN docs into Sphinx (connect docs to toc + css) r=nchevobbe,ahal 2021-11-03 10:45:52 +00:00
perfdocs Bug 1725399: [perfdocs] Add link to DAMP tests in performance testing index page r=perftest-reviewers,AlexandruIonescu 2021-08-17 13:33:45 +00:00
platform Bug 1731564: Use motivated SpinEventLoopUntil inside devtools/*. r=devtools-reviewers,jdescottes 2021-10-07 08:06:11 +00:00
server Bug 1730154 - [devtools] Create targets for iframes reusing the initial about:blank WindowGlobal. r=nchevobbe 2021-11-03 17:40:25 +00:00
shared Bug 1675456 - [devtools] Enable watcher for webextension toolboxes. r=nchevobbe,devtools-backward-compat-reviewers 2021-11-03 11:08:54 +00:00
startup Bug 1567443 - Added flag for indicating secure Chrome UI in nsIAboutModule. r=pbz,webcompat-reviewers,twisniewski 2021-10-26 13:32:31 +00:00
.eslintrc.js
.eslintrc.xpcshell.js
CODE_OF_CONDUCT.md
moz.build Bug 1737573 - [devtools] Migrate MDN docs into Sphinx (connect docs to toc + css) r=nchevobbe,ahal 2021-11-03 10:45:52 +00:00
templates.mozbuild
tsconfig.json