Dart Documentationchrome.tabsTabsCreateParams

TabsCreateParams class

class TabsCreateParams extends ChromeObject {
 TabsCreateParams({int windowId, int index, String url, bool active, bool pinned, int openerTabId}) {
   if (windowId != null) this.windowId = windowId;
   if (index != null) this.index = index;
   if (url != null) this.url = url;
   if (active != null) this.active = active;
   if (pinned != null) this.pinned = pinned;
   if (openerTabId != null) this.openerTabId = openerTabId;
 }
 TabsCreateParams.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

 /**
  * The window to create the new tab in. Defaults to the [current
  * window](windows.html#current-window).
  */
 int get windowId => jsProxy['windowId'];
 set windowId(int value) => jsProxy['windowId'] = value;

 /**
  * The position the tab should take in the window. The provided value will be
  * clamped to between zero and the number of tabs in the window.
  */
 int get index => jsProxy['index'];
 set index(int value) => jsProxy['index'] = value;

 /**
  * The URL to navigate the tab to initially. Fully-qualified URLs must include
  * a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative
  * URLs will be relative to the current page within the extension. Defaults to
  * the New Tab Page.
  */
 String get url => jsProxy['url'];
 set url(String value) => jsProxy['url'] = value;

 /**
  * Whether the tab should become the active tab in the window. Does not affect
  * whether the window is focused (see [windows.update]). Defaults to [true].
  */
 bool get active => jsProxy['active'];
 set active(bool value) => jsProxy['active'] = value;

 /**
  * Whether the tab should be pinned. Defaults to [false]
  */
 bool get pinned => jsProxy['pinned'];
 set pinned(bool value) => jsProxy['pinned'] = value;

 /**
  * The ID of the tab that opened this tab. If specified, the opener tab must
  * be in the same window as the newly created tab.
  */
 int get openerTabId => jsProxy['openerTabId'];
 set openerTabId(int value) => jsProxy['openerTabId'] = value;
}

Extends

ChromeObject > TabsCreateParams

Constructors

new TabsCreateParams({int windowId, int index, String url, bool active, bool pinned, int openerTabId}) #

Create a new instance of a ChromeObject, which creates and delegates to a JsObject proxy.

docs inherited from ChromeObject
TabsCreateParams({int windowId, int index, String url, bool active, bool pinned, int openerTabId}) {
 if (windowId != null) this.windowId = windowId;
 if (index != null) this.index = index;
 if (url != null) this.url = url;
 if (active != null) this.active = active;
 if (pinned != null) this.pinned = pinned;
 if (openerTabId != null) this.openerTabId = openerTabId;
}

new TabsCreateParams.fromProxy(JsObject jsProxy) #

Create a new instance of a ChromeObject, which delegates to the given JsObject proxy.

docs inherited from ChromeObject
TabsCreateParams.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

Properties

bool active #

Whether the tab should become the active tab in the window. Does not affect whether the window is focused (see windows.update). Defaults to true.

bool get active => jsProxy['active'];
set active(bool value) => jsProxy['active'] = value;

int index #

The position the tab should take in the window. The provided value will be clamped to between zero and the number of tabs in the window.

int get index => jsProxy['index'];
set index(int value) => jsProxy['index'] = value;

final jsProxy #

inherited from ChromeObject
final dynamic jsProxy

int openerTabId #

The ID of the tab that opened this tab. If specified, the opener tab must be in the same window as the newly created tab.

int get openerTabId => jsProxy['openerTabId'];
set openerTabId(int value) => jsProxy['openerTabId'] = value;

bool pinned #

Whether the tab should be pinned. Defaults to false

bool get pinned => jsProxy['pinned'];
set pinned(bool value) => jsProxy['pinned'] = value;

String url #

The URL to navigate the tab to initially. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page.

String get url => jsProxy['url'];
set url(String value) => jsProxy['url'] = value;

int windowId #

The window to create the new tab in. Defaults to the current window.

int get windowId => jsProxy['windowId'];
set windowId(int value) => jsProxy['windowId'] = value;

Methods

JsObject toJs() #

inherited from ChromeObject
JsObject toJs() => jsProxy;

String toString() #

inherited from ChromeObject

Returns a string representation of this object.

docs inherited from Object
String toString() => jsProxy.toString();