UserScript constructor
UserScript({
- String? groupName,
- required String source,
- required UserScriptInjectionTime injectionTime,
- @Deprecated("Use forMainFrameOnly instead") bool? iosForMainFrameOnly,
- bool forMainFrameOnly = true,
- Set<
String> ? allowedOriginRules, - ContentWorld? contentWorld,
Implementation
UserScript(
{this.groupName,
required this.source,
required this.injectionTime,
@Deprecated("Use forMainFrameOnly instead") this.iosForMainFrameOnly,
this.forMainFrameOnly = true,
Set<String>? allowedOriginRules,
ContentWorld? contentWorld}) {
this.allowedOriginRules =
allowedOriginRules != null ? allowedOriginRules : Set.from(["*"]);
this.contentWorld = contentWorld ?? ContentWorld.PAGE;
this.forMainFrameOnly = this.iosForMainFrameOnly != null
? this.iosForMainFrameOnly!
: this.forMainFrameOnly;
}