FirefoxClient

Heather Arthur edited this page Aug 12, 2013 · 3 revisions

Methods

connect

connect([port], [host], callback)

Create a remote debugging connection. Port defaults to 6000 and host defaults to localhost.

client.connect(function(err) {
  console.log("connection established")
});

listTabs

listTabs(callback)

Get a list of all the currently open tabs (as Tab objects):

client.listTabs(function(err, tabs) {
  var tab = tabs[0]
  console.log("first tab:", tab.url);
})

selectedTab

selectedTab(callback)

Get the currently selected tab (as a Tab object):

client.selectedTab(function(err, tab) {
  console.log("selected tab", tab.url);
})