Skip to content
Gustavo Rodrigues edited this page Jun 2, 2015 · 3 revisions

Methods

reload

reload(cb)

Reload the tab:

tab.reload(function(err) {
  console.log("reloading the tab");
});

navigateTo

navigateTo(url, cb)

Navigate tab to a new page:

tab.navigateTo("http://github.com", function(err) {
  console.log("navigating to a new url");
});

attach

attach(cb)

Call to start receiving tab events.

detach

detach(cb)

Call to stop receiving tab events.

Events

navigate

Fired when the page navigates. Note: must call attach() to receive these events.

tab.on("navigate", function(event) {
  console.log("navigated to:", event.url + event.title);
});

before-navigate

Fired when the page is about to navigate. Note: must call attach() to receive these events.

tab.on("before-navigate", function(event) {
  console.log("navigating to:", event.url);
});
Clone this wiki locally