InjectDetails class
Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
class InjectDetails extends ChromeObject { InjectDetails({String code, String file, bool allFrames, String runAt}) { if (code != null) this.code = code; if (file != null) this.file = file; if (allFrames != null) this.allFrames = allFrames; if (runAt != null) this.runAt = runAt; } InjectDetails.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy); /** * JavaScript or CSS code to inject. */ String get code => jsProxy['code']; set code(String value) => jsProxy['code'] = value; /** * JavaScript or CSS file to inject. */ String get file => jsProxy['file']; set file(String value) => jsProxy['file'] = value; /** * If allFrames is `true`, implies that the JavaScript or CSS should be * injected into all frames of current page. By default, it's `false` and is * only injected into the top frame. */ bool get allFrames => jsProxy['allFrames']; set allFrames(bool value) => jsProxy['allFrames'] = value; /** * The soonest that the JavaScript or CSS will be injected into the tab. * Defaults to "document_idle". * enum of `document_start`, `document_end`, `document_idle` */ String get runAt => jsProxy['runAt']; set runAt(String value) => jsProxy['runAt'] = value; }
Extends
ChromeObject > InjectDetails
Constructors
new InjectDetails({String code, String file, bool allFrames, String runAt}) #
Create a new instance of a ChromeObject
, which creates and delegates to
a JsObject proxy.
InjectDetails({String code, String file, bool allFrames, String runAt}) { if (code != null) this.code = code; if (file != null) this.file = file; if (allFrames != null) this.allFrames = allFrames; if (runAt != null) this.runAt = runAt; }
new InjectDetails.fromProxy(JsObject jsProxy) #
Create a new instance of a ChromeObject
, which delegates to the given
JsObject proxy.
InjectDetails.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);
Properties
bool allFrames #
If allFrames is true
, implies that the JavaScript or CSS should be
injected into all frames of current page. By default, it's false
and is
only injected into the top frame.
bool get allFrames => jsProxy['allFrames'];
set allFrames(bool value) => jsProxy['allFrames'] = value;
String code #
JavaScript or CSS code to inject.
String get code => jsProxy['code'];
set code(String value) => jsProxy['code'] = value;
String file #
JavaScript or CSS file to inject.
String get file => jsProxy['file'];
set file(String value) => jsProxy['file'] = value;
String runAt #
The soonest that the JavaScript or CSS will be injected into the tab.
Defaults to "document_idle".
enum of document_start
, document_end
, document_idle
String get runAt => jsProxy['runAt'];
set runAt(String value) => jsProxy['runAt'] = value;
Methods
String toString() #
Returns a string representation of this object.
String toString() => jsProxy.toString();