Hi,
I created extension that uses webNavigation.onBeforeNavigate
currently I just use alert for testing.
The problem is that it fires many times for each page and I need only top url.
How to detect it ?
(for ex. in C++ API for IExplore there is get_TopLevelContainer for IWebBrowser2)
chrome.webNavigation.onBeforeNavigate.addListener(
function (object) {
if ( object.url.indexOf("http") > -1)
{
//if ( topUrl ) /
alert('object.url - '+object.url);
}
});
May be anybody can help ?