Dart Documentationchrome.sessionsSession

Session class

class Session extends ChromeObject {
 Session({int lastModified, Tab tab, Window window}) {
   if (lastModified != null) this.lastModified = lastModified;
   if (tab != null) this.tab = tab;
   if (window != null) this.window = window;
 }
 Session.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

 /**
  * The time when the window or tab was closed or modified, represented in
  * milliseconds since the epoch.
  */
 int get lastModified => jsProxy['lastModified'];
 set lastModified(int value) => jsProxy['lastModified'] = value;

 /**
  * The [tabs.Tab], if this entry describes a tab. Either this or
  * [Session.window] will be set.
  */
 Tab get tab => _createTab(jsProxy['tab']);
 set tab(Tab value) => jsProxy['tab'] = jsify(value);

 /**
  * The [windows.Window], if this entry describes a window. Either this or
  * [Session.tab] will be set.
  */
 Window get window => _createWindow(jsProxy['window']);
 set window(Window value) => jsProxy['window'] = jsify(value);
}

Extends

ChromeObject > Session

Constructors

new Session({int lastModified, Tab tab, Window window}) #

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

docs inherited from ChromeObject
Session({int lastModified, Tab tab, Window window}) {
 if (lastModified != null) this.lastModified = lastModified;
 if (tab != null) this.tab = tab;
 if (window != null) this.window = window;
}

new Session.fromProxy(JsObject jsProxy) #

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

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

Properties

final jsProxy #

inherited from ChromeObject
final dynamic jsProxy

int lastModified #

The time when the window or tab was closed or modified, represented in milliseconds since the epoch.

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

Tab tab #

The tabs.Tab, if this entry describes a tab. Either this or Session.window will be set.

Tab get tab => _createTab(jsProxy['tab']);
set tab(Tab value) => jsProxy['tab'] = jsify(value);

Window window #

The windows.Window, if this entry describes a window. Either this or Session.tab will be set.

Window get window => _createWindow(jsProxy['window']);
set window(Window value) => jsProxy['window'] = jsify(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();