ScriptHtmlTagAttributes class Null safety

Class that represents the possible the <script> HTML attributes to be set used by InAppWebViewController.injectJavascriptFileFromUrl.


ScriptHtmlTagAttributes({String type = "text/javascript", String? id, bool? async, bool? defer, CrossOrigin? crossOrigin, String? integrity, bool? noModule, String? nonce, ReferrerPolicy? referrerPolicy, dynamic onLoad()?, dynamic onError()?})


async bool?
For classic scripts, if the async attribute is present, then the classic script will be fetched in parallel to parsing and evaluated as soon as it is available.
read / write
crossOrigin CrossOrigin?
Normal script elements pass minimal information to the window.onerror for scripts which do not pass the standard CORS checks. To allow error logging for sites which use a separate domain for static media, use this attribute.
read / write
defer bool?
This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed, but before firing DOMContentLoaded.
read / write
hashCode int
The hash code for this object.
read-only, inherited
id String?
The HTML id attribute is used to specify a unique id for the <script> HTML element.
read / write
integrity String?
This attribute contains inline metadata that a user agent can use to verify that a fetched resource has been delivered free of unexpected manipulation.
read / write
noModule bool?
This Boolean attribute is set to indicate that the script should not be executed in browsers that support ES2015 modules — in effect, this can be used to serve fallback scripts to older browsers that do not support modular JavaScript code.
read / write
nonce String?
A cryptographic nonce (number used once) to whitelist scripts in a script-src Content-Security-Policy. The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource's policy is otherwise trivial.
read / write
onError ↔ (dynamic Function?()?)
Represents a callback function that will be called if an error occurred while trying to load the script.
read / write
onLoad ↔ (dynamic Function?()?)
Represents a callback function that will be called as soon as the script has been loaded successfully.
read / write
referrerPolicy ReferrerPolicy?
Indicates which referrer to send when fetching the script, or resources fetched by the script.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
type String
This attribute indicates the type of script represented. The value of this attribute will be in one of the following categories. The default value is text/javascript.
read / write


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
toJson() Map<String, dynamic>
toMap() Map<String, dynamic>
toString() String
A string representation of this object.


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