| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
WebView.UserScripts
Queries list of user scripts.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| WebView | 9.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |
MBS( "WebView.UserScripts"; WebViewerRef ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| WebViewerRef | Either the Web Viewer Object Name or the Web Viewer ID as returned by "WebView.FindByName" function. |
Result
Returns JSON or error.
Description
Queries list of user scripts.Returns JSON array of objects with three fields for each script: source, injectionTime and forMainFrameOnly.
injectionTime is either AtDocumentStart or AtDocumentEnd.
forMainFrameOnly is a boolean value.
Examples
Query user scripts:
MBS( "Webview.UserScripts"; "web" )
Example result:
[ { "forMainFrameOnly" : true, "source" : "alert('Hello');", "injectionTime" : "AtDocumentEnd" } ]
Example result:
[ { "forMainFrameOnly" : true, "source" : "alert('Hello');", "injectionTime" : "AtDocumentEnd" } ]
See also
Release notes
- Version 9.5
- Added Webview.AddUserScript, Webview.UserScripts and Webview.RemoveAllUserScripts functions.
Blog Entries
This function checks for a license.
Created 8th November 2019, last changed 5th January 2020