ChromeScripting class

Properties

hashCode → int
The hash code for this object.
no setterinherited
isAvailable → bool
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

executeScript(ScriptInjection injection) → Future<List<InjectionResult>>
Injects a script into a target context. By default, the script will be run at document_idle, or immediately if the page has already loaded. If the injectImmediately property is set, the script will inject without waiting, even if the page has not finished loading. If the script evaluates to a promise, the browser will wait for the promise to settle and return the resulting value. |injection|: The details of the script which to inject. |Returns|: Returns a Promise which resolves upon completion of the injection. The resulting array contains the result of execution for each frame where the injection succeeded.
getRegisteredContentScripts(ContentScriptFilter? filter) → Future<List<RegisteredContentScript>>
Returns all dynamically registered content scripts for this extension that match the given filter. |filter|: An object to filter the extension's dynamically registered scripts.
insertCSS(CSSInjection injection) → Future<void>
Inserts a CSS stylesheet into a target context. If multiple frames are specified, unsuccessful injections are ignored. |injection|: The details of the styles to insert. |Returns|: Returns a Promise which resolves upon completion of the insertion.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerContentScripts(List<RegisteredContentScript> scripts) → Future<void>
Registers one or more content scripts for this extension. |scripts|: Contains a list of scripts to be registered. If there are errors during script parsing/file validation, or if the IDs specified already exist, then no scripts are registered. |Returns|: Returns a Promise which resolves once scripts have been fully registered or rejects if an error has occurred.
removeCSS(CSSInjection injection) → Future<void>
Removes a CSS stylesheet that was previously inserted by this extension from a target context. |injection|: The details of the styles to remove. Note that the css, files, and origin properties must exactly match the stylesheet inserted through insertCSS. Attempting to remove a non-existent stylesheet is a no-op. |Returns|: Returns a Promise which resolves upon the completion of the removal.
toString() → String
A string representation of this object.
inherited
unregisterContentScripts(ContentScriptFilter? filter) → Future<void>
Unregisters content scripts for this extension. |filter|: If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered. |Returns|: Returns a Promise which resolves once scripts have been unregistered or rejects if an error has occurred.
updateContentScripts(List<RegisteredContentScript> scripts) → Future<void>
Updates one or more content scripts for this extension. |scripts|: Contains a list of scripts to be updated. A property is only updated for the existing script if it is specified in this object. If there are errors during script parsing/file validation, or if the IDs specified do not correspond to a fully registered script, then no scripts are updated. |Returns|: Returns a Promise which resolves once scripts have been updated or rejects if an error has occurred.

Operators

operator ==(Object other) → bool
The equality operator.
inherited