ChromeUserScripts 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

configureWorld(WorldProperties properties) → Future<void>
Configures the USER_SCRIPT execution environment. |properties|: Contains the user script world configuration. |Returns|: Promise that resolves once the world has been configured.
execute(UserScriptInjection 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.
getScripts(UserScriptFilter? filter) → Future<List<RegisteredUserScript>>
Returns all dynamically-registered user scripts for this extension. |filter|: If specified, this method returns only the user scripts that match it. |Returns|: Promise that resolves with the registered scripts. The promise will be rejected if an error occurs.
getWorldConfigurations() → Future<List<WorldProperties>>
Retrieves all registered world configurations. |Returns|: Promise that resolves with the registered world configurations.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register(List<RegisteredUserScript> scripts) → Future<void>
Registers one or more user scripts for this extension. |scripts|: Contains a list of user scripts to be registered. |Returns|: Promise that resolves once scripts have been fully registered. The promise will be rejected if an error occurs.
resetWorldConfiguration(String? worldId) → Future<void>
Resets the configuration for a user script world. Any scripts that inject into the world with the specified ID will use the default world configuration. |worldId|: The ID of the user script world to reset. If omitted, resets the default world's configuration. |Returns|: Promise that resolves when the configuration is reset.
toString() → String
A string representation of this object.
inherited
unregister(UserScriptFilter? filter) → Future<void>
Unregisters all dynamically-registered user scripts for this extension. |filter|: If specified, this method unregisters only the user scripts that match it. |Returns|: Promise that resolves once scripts have been fully unregistered. The promise will be rejected if an error occurs.
update(List<RegisteredUserScript> scripts) → Future<void>
Updates one or more user scripts for this extension. |scripts|: Contains a list of user 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|: Promise that resolves once scripts have been fully updated. The promise will be rejected if an error occurs.

Operators

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