Pacerier
Pacerier

Reputation: 89643

Chrome Extension Dev: How to test onTabReplaced?

I need to test code on webNavigation.onTabReplaced.

onTabReplaced

Fired when the contents of the tab is replaced by a different (usually previously pre-rendered) tab.

Is there a page/script/method to activate it?

Upvotes: 1

Views: 115

Answers (1)

Parag
Parag

Reputation: 430

From the documentation, It mentions that onTabReplace event is fired when a Tab is replaced due to prerendering and Instant. Looking at the documentation of Chromium Prerender functionality at link, looks like you can trigger a prerender using a <link rel="prerender"> element.

Alternatively http://prerender-test.appspot.com/ is an example application making use of prerender. You can use this if all you want is to trigger the event.

Note: You need to enable the option "Use a prediction service to load pages more quickly" in chrome's advanced settings.

Upvotes: 2

Related Questions