Dart Documentationchrome.sessionsDevice

Device class

class Device extends ChromeObject {
 Device({String info, List<Session> sessions}) {
   if (info != null) this.info = info;
   if (sessions != null) this.sessions = sessions;
 }
 Device.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

 /**
  * Represents all information about a foreign device.
  */
 String get info => jsProxy['info'];
 set info(String value) => jsProxy['info'] = value;

 /**
  * A list of open window sessions for the foreign device, sorted from most
  * recently to least recently modified session.
  */
 List<Session> get sessions => listify(jsProxy['sessions'], _createSession);
 set sessions(List<Session> value) => jsProxy['sessions'] = jsify(value);
}

Extends

ChromeObject > Device

Constructors

new Device({String info, List<Session> sessions}) #

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

docs inherited from ChromeObject
Device({String info, List<Session> sessions}) {
 if (info != null) this.info = info;
 if (sessions != null) this.sessions = sessions;
}

new Device.fromProxy(JsObject jsProxy) #

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

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

Properties

String info #

Represents all information about a foreign device.

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

final jsProxy #

inherited from ChromeObject
final dynamic jsProxy

List<Session> sessions #

A list of open window sessions for the foreign device, sorted from most recently to least recently modified session.

List<Session> get sessions => listify(jsProxy['sessions'], _createSession);
set sessions(List<Session> value) => jsProxy['sessions'] = 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();