RegisteredContentScript class

Constructors

RegisteredContentScript({required String id, List<String>? matches, List<String>? excludeMatches, List<String>? css, List<String>? js, bool? allFrames, bool? matchOriginAsFallback, RunAt? runAt, bool? persistAcrossSessions, ExecutionWorld? world})
RegisteredContentScript.fromJS(RegisteredContentScript _wrapped)

Properties

allFrames bool?
If specified true, it will inject into all frames, even if the frame is not the top-most frame in the tab. Each frame is checked independently for URL requirements; it will not inject into child frames if the URL requirements are not met. Defaults to false, meaning that only the top frame is matched.
getter/setter pair
css List<String>?
The list of CSS files to be injected into matching pages. These are injected in the order they appear in this array, before any DOM is constructed or displayed for the page.
getter/setter pair
excludeMatches List<String>?
Excludes pages that this content script would otherwise be injected into. See Match Patterns for more details on the syntax of these strings.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String
The id of the content script, specified in the API call. Must not start with a '_' as it's reserved as a prefix for generated script IDs.
getter/setter pair
js List<String>?
The list of JavaScript files to be injected into matching pages. These are injected in the order they appear in this array.
getter/setter pair
matches List<String>?
Specifies which pages this content script will be injected into. See Match Patterns for more details on the syntax of these strings. Must be specified for registerContentScripts.
getter/setter pair
matchOriginAsFallback bool?
Indicates whether the script can be injected into frames where the URL contains an unsupported scheme; specifically: about:, data:, blob:, or filesystem:. In these cases, the URL's origin is checked to determine if the script should be injected. If the origin is null (as is the case for data: URLs) then the used origin is either the frame that created the current frame or the frame that initiated the navigation to this frame. Note that this may not be the parent frame.
getter/setter pair
persistAcrossSessions bool?
Specifies if this content script will persist into future sessions. The default is true.
getter/setter pair
runAt RunAt?
Specifies when JavaScript files are injected into the web page. The preferred and default value is document_idle.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toJS → RegisteredContentScript
no setter
world ExecutionWorld?
The JavaScript "world" to run the script in. Defaults to ISOLATED.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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