Allow to retrieve the URI of the ongoing page load from the parent process
Categories
(Core :: DOM: Navigation, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox98 | --- | fixed |
People
(Reporter: whimboo, Assigned: smaug)
References
Details
Attachments
(1 file)
In Marionette we can have situations when we start using the WebProgress of a browsing context while it is already navigating. As such we miss the onStateChange
callback for STATE_START
and can't easily retrieve the URI of the current page load via the request
instance. Right now the only option is to wait until another method of the listener is called.
It would be great to have the capability to immediately check the WebProgress for the current default load request
and its originalURI
and that directly from the parent process.
As given by Nika and Olli there is no such thing available yet. Here is what Nika mentioned on Element:
You could try adding something which just tries to read the URI from the request in BrowsingContextWebProgress I suppose? I'm not sure if it'll work all of the times you'd want it to, but it'sworth a shot
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Updated•3 years ago
|
Reporter | ||
Comment 3•3 years ago
|
||
Thanks a lot Olli! This actually works great with the Marionette unit tests needing this feature. The only thing that I observed is that documentRequest
is only set when there is an active load and otherwise null
. I assume that this behavior is what we want? When not loading I can get the URL via browsingContext.currentURI.spec
.
Assignee | ||
Comment 4•3 years ago
|
||
That is the behavior I'd expect. It is similar-ish to nsIDocumentLoader.documentChannel behavior - once the page has been loaded, the request is gone.
Also, I did document that behavior in the .idl file ;)
Updated•3 years ago
|
Reporter | ||
Comment 5•3 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #4)
Also, I did document that behavior in the .idl file ;)
Thanks! And I actually haven't had a look at the patch itself so I missed that. But sounds good.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 7•3 years ago
|
||
bugherder |
Description
•