6

I have the following listener:

chrome.tabs.onUpdated.addListener(function(tabId, change, tab) {
  if (change.status == "complete") {
    // Do something
  }
});

After upgrading my chromium browser from 16.x to 17.x I've paid an attention that this listener is not always fired. For example, when it seems like the page is retrieved from cache (loads very quickly) it doesn't fire. Then, if I reload the page, it's fired as usual.

Are there any changes made to this API method in 17.x?

Thanks!

David Dehghan
  • 22,159
  • 10
  • 107
  • 95
Michael Spector
  • 36,723
  • 6
  • 60
  • 88
  • 1
    Would you mind filing a bug at http://new.crbug.com/ with some details (a test case would be brilliant)? The event should trigger whenever the tab updates, even if it's updating from cache. Post the bug ID here, and I'll throw it into the correct queue. – Mike West Mar 01 '12 at 12:25
  • I haven't noticed any changes in the API methods the past few days - but I have notice some thing behaving differently myself. Most of it is from the default style sheet though. – jjNford Mar 01 '12 at 16:05
  • 1
    I've reported one already http://code.google.com/p/chromium/issues/detail?id=116379 – Michael Spector Mar 01 '12 at 16:06
  • 4
    I think I have figured out the issue here. For some reason when some pages are loaded chrome treats it as a tab replacement instead of an update. Using the onReplaced event can capture this.http://developer.chrome.com/extensions/tabs.html#event-onReplaced – Alex Wissmann Sep 11 '13 at 17:13
  • Retargeting the duplicate as the old target does not exist anymore and existing answers are not good enough. – Xan May 12 '16 at 13:26

1 Answers1

0

I've come across the same bug. In the meantime, I'm using the tabs.onActiveChanged event, which seems to fire when focus switches from the instant bar back to the tab. I'm not sure if it's a particularly robust solution, but so far it is working for me.

Stu Gla
  • 1,129
  • 12
  • 16