code: func (remote *RemoteDebugger) TabList(filter string) ([]*Tab, error) {
  	resp, err := responseError(remote.http.Get("/json/list", nil, nil))
  	if err != nil {
  		return nil, err
  	}
  
  	var tabs []*Tab
  
  	if err = decode(resp, &tabs); err != nil {
  		return nil, err
  	}
  
  	if filter == "" {
  		return tabs, nil
  	}
  
  	var filtered []*Tab
  
  	for _, t := range tabs {
  		if t.Type == filter {
  			filtered = append(filtered, t)
  		}
  	}
  
  	return filtered, nil
  }
docs: // TabList returns a list of opened tabs/pages.
  // If filter is not empty, only tabs of the specified type are returned (i.e. "page").
  //
  // Note that tabs are ordered by activitiy time (most recently used first) so the
  // current tab is the first one of type "page".