webNavigation should add support for onNavigateAway

19 views
Skip to first unread message

Emrah Baskaya

unread,
Oct 8, 2015, 9:30:14 AM10/8/15
to Chromium-extensions
As I understand, one of the reasons webNavigation was implemented was to relieve the extension developers of doing url checks themselves using the tabs api by providing performant url filtering methods and reducing CPU use along the way.

An extension of mine needs to hold a list of tabs on a specific host, in order to prevent unnecessary background house-keeping tasks on other Tabs (causing some network and cpu usage). These can be initiated using the webNavigation api onCommitted event, however, I need to disable these once the user navigates away, or closes a tab.

This functionality currently can be achieved using a mix of webNavigation and Tabs api: web navigation forms a list of targeted tabs, while Tabs api could be used to track the changes in the Tab URL and tab closing.

That said, all this functionality could be achieved using webNavigation api, if the api provided onNavigateAway event, which is fired when an URL is changed from the filtered URL to an URL which does not meet the filter, or when the tab is closed. (although a tab close could be considered in the domain of Tabs api, firing the navigateAway event on tab close would complete the functionality (of keeping the list of desired tabs, through url filtering using a single API)

I'd like to hear your views on this and whether I am posting these in the right avenue. Thanks!


Timo Reimann

unread,
Oct 11, 2015, 4:20:21 AM10/11/15
to Chromium-extensions
I personally had to build this kind of functionality into a Chrome extension myself, and thus would like such an event to come with the API as well. (Though I'm not 100% on the filter usage logic you suggested, but that's an implementation detail.)

My suggestion would be to file an official feature request and let the project do some triaging. Be sure to link to the issue from here in that case.

Emrah Baskaya

unread,
Oct 12, 2015, 1:25:36 PM10/12/15
to Chromium-extensions
Thanks, I did a report on: https://code.google.com/p/chromium/issues/detail?id=542344&thanks=542344&ts=1444670689 , hoping that it's the right place.


Emrah Baskaya

unread,
Oct 15, 2015, 6:22:46 PM10/15/15
to Chromium-extensions


On Sunday, October 11, 2015 at 11:20:21 AM UTC+3, Timo Reimann wrote:
I personally had to build this kind of functionality into a Chrome extension myself, and thus would like such an event to come with the API as well. (Though I'm not 100% on the filter usage logic you suggested, but that's an implementation detail.)

My suggestion would be to file an official feature request and let the project do some triaging. Be sure to link to the issue from here in that case.


The suggestion was shut down, I asked for a re-consideration but not too hopeful. Thanks for pointing me at the right direction, though.
 
Reply all
Reply to author
Forward
0 new messages