New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 908380 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Feature



Sign in to add a comment

Provide parentFrameId in chrome.webNavigation.onCommitted event

Reported by d...@adblockplus.org, Nov 26

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36

Steps to reproduce the problem:
1. Create a listener for the onCommitted event inside the background script of an extension:

chrome.webNavigation.onCommitted.addListener(details =>
{
  console.log("onCommitted", details.parentFrameId);
});

2. Browse a few webpages.

What is the expected behavior?
The parent frame's ID will be provided where possible, as it is with Firefox, with the equivalent browser.webNavigation.onCommitted event.

What went wrong?
details.parentFrameId is always undefined.

Did this work before? No 

Does this work in other browsers? Yes

Chrome version: 70.0.3538.110  Channel: stable
OS Version: 70
Flash Version: 

This would be useful for Adblock Plus. See adblockpluschrome/ext/background.js.
 
TE@, this is a feature request since Chrome never provided parentFrameId for webNavigation events:
https://developer.chrome.com/extensions/webNavigation#property-onCommitted-callback

P.S. the only workaround is to invoke chrome.webNavigation.getFrame,
but it's asynchronous so it won't help in certain scenarios.
Yep, I realise this is a change request, but it's not true that Chrome doesn't provide parentFrameId for any webNavigation events. It provides it for onBeforeNavigate. (Also worth noting, Firefox provides parentFrameID for onCommitted.)
re 2, indeed it was added to onBeforeNavigate in  issue 128927  but for an unknown reason the developer stopped after onBeforeNavigate even though the initial plan was to "send the parent frame id with the webNavigation events" (quoting from the issue) - note the plural "events". On the other hand, it means a synchronous workaround in js code is totally possible.
Cool, glad to hear the plan is to include the parentFrameId in the other events too. Well spotted.
Components: Platform>Extensions
Labels: Needs-Triage-M70
Cc: swarnasree.mukkala@chromium.org
Labels: -Type-Bug Triaged-ET Target-72 M-72 FoundIn-71 FoundIn-70 FoundIn-72 OS-Mac OS-Windows Type-Feature
Status: Untriaged (was: Unconfirmed)
As per comment#1 and comment#2, the issue seems to be a feature request, hence marking it as untriaged and requesting someone from the dev team to look into the issue.

Thanks.!
Cc: kelvinjiang@chromium.org rdevlin....@chromium.org nasko@chromium.org
Status: Available (was: Untriaged)
This sounds reasonable.  Nasko, as owner of webNavigation, any concerns here?
Labels: -Hotlist-Interop

Sign in to add a comment