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.
,
Nov 26
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.)
,
Nov 26
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.
,
Nov 26
Cool, glad to hear the plan is to include the parentFrameId in the other events too. Well spotted.
,
Nov 26
,
Nov 27
,
Nov 28
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.!
,
Nov 30
This sounds reasonable. Nasko, as owner of webNavigation, any concerns here?
,
Dec 1
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by woxxom@gmail.com
, Nov 26