Open Bug 1620774 Opened 5 years ago Updated 7 months ago

Add pendingUrl to tabs.Tab

Categories

(WebExtensions :: General, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: kernp25, Unassigned)

Details

(Keywords: parity-chrome)

Chrome now has a "pendingUrl" property in tabs.Tab:
https://developer.chrome.com/extensions/tabs#property-Tab-pendingUrl

The URL the tab is navigating to, before it has committed. This property is only present if >the extension's manifest includes the "tabs" permission and there is a pending navigation.

Should Firefox also have this property?

Flags: needinfo?(mixedpuppy)

Assuming it's possible, yeah we should add it. I don't know that we'd get to it soon. I'll leave off priority so we triage it next week.

Flags: needinfo?(mixedpuppy)
Keywords: parity-chrome
Priority: -- → P3

Additional documentation about the change in Chrome:

The url property used to refer to what was shown in the location bar; now it reflects the actual URL of the loaded document.
pendingUrl is only set if there is a pending navigation, and it holds the value of the URL that is being loaded but not committed yet. This is possible, because in Chrome all loads goes through the main browser process.

In Firefox, we internally use browser.currentURI, i.e. browser.webNavigation.currentURI. The latter is updated upon onLocationChange, which matches with when webNavigation.onCommitted is triggered. So, with Chrome's change, their .url property now matches with how Firefox has already been behaving.

In order to implement pendingUrl, we need to be able to query the URL/nsIURI of the tab's current pending load, from the parent process. Is this information even available?

Severity: normal → S3

Does it mean that on Firefox, there is no way to collect the URL of newly opened tabs? Assumes the user opened a new tab via middle click and the tab is not loaded yet.

Severity: S3 → N/A
Status: UNCONFIRMED → NEW
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.