initialUserScripts property
Initial list of user scripts to be loaded at start or end of a page loading.
To add or remove user scripts, you have to use the InAppWebViewController's methods such as InAppWebViewController.addUserScript,
InAppWebViewController.removeUserScript, InAppWebViewController.removeAllUserScripts, etc.
Officially Supported Platforms/Implementations:
- Android WebView
- iOS WKWebView:
- This property will be ignored if the
PlatformWebViewCreationParams.windowIdhas been set. There isn't any way to add/remove user scripts specific to iOS window WebViews. This is a limitation of the native WebKit APIs.
- This property will be ignored if the
- macOS WKWebView:
- This property will be ignored if the
PlatformWebViewCreationParams.windowIdhas been set. There isn't any way to add/remove user scripts specific to iOS window WebViews. This is a limitation of the native WebKit APIs.
- This property will be ignored if the
- Windows WebView2
- Linux WPE WebKit
Use the PlatformInAppBrowser.isPropertySupported method to check if this property is supported at runtime.
Implementation
final UnmodifiableListView<UserScript>? initialUserScripts;