Platforms to show: All Mac Windows Linux Cross-Platform
Back to WKWebViewIOSControlMBS control.
WKWebViewIOSControlMBS.addScriptMessageHandler(Name as String)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
Name: The name of the message handler.
Adding a script message handler with name name causes the JavaScript function window.webkit.messageHandlers.name.postMessage(messageBody) to be defined in all frames in all web views that use the user content controller.
WKWebViewIOSControlMBS.addUserScript(userScript as WKUserScriptMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
WKWebViewIOSControlMBS.EvaluateJavaScript(JavaScript as String, byref Error as NSErrorMBS) as Variant
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
Synchronous version which waits for JavaScript to return the value.
Error is set in case of errors.
Result is converted from JavaScript data types to Xojo datatypes, usually variants, dictionaries or array of variants.
See also:
WKWebViewIOSControlMBS.EvaluateJavaScript(JavaScript as String, Tag as String = "")
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
Calls later JavaScriptEvaluated event with result and passed tag value.
Result is converted from JavaScript data types to Xojo datatypes, usually variants, dictionaries or array of variants.
See also:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
Sets Navigation property.
WKWebViewIOSControlMBS.goForward
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
Sets Navigation property.
WKWebViewIOSControlMBS.goToBackForwardListItem(Item as WKBackForwardListItemMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
item: The item to which to navigate. Must be one of the items in the web view's back-forward list.
Sets Navigation property.
WKWebViewIOSControlMBS.LoadData(Data as MemoryBlock, MIMEType as String, textEncodingName as String, baseURL as string = "")
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
data: The data to use as the contents of the webpage.
MIMEType: The MIME type of the data.
characterEncodingName: The data's character encoding name.
baseURL: A URL used to resolve relative URLs within the document.
Sets Navigation property.
WKWebViewIOSControlMBS.LoadFileURL(File as FolderItem, readAccessItem as FolderItem)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
Navigates to the requested file URL on the filesystem.
file: The file URL to which to navigate.
readAccessItem: The file or folder to allow read access to.
If readAccessItem references a single file, only that file may be loaded by WebKit.
If readAccessItem references a directory, files inside that file may be loaded by WebKit.
Sets Navigation property.
WKWebViewIOSControlMBS.LoadHTML(htmlText as String, baseURL as string = "")
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
htmlText: The string to use as the contents of the webpage.
baseURL: A URL used to resolve relative URLs within the document.
Sets Navigation property.
WKWebViewIOSControlMBS.LoadURL(URL as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
Sets Navigation property.
Sets Navigation property.
WKWebViewIOSControlMBS.LoadURLRequest(Request as NSURLRequestMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
Sets Navigation property.
WKWebViewIOSControlMBS.pauseAllMediaPlayback New in 24.5
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 24.5 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
Calls pauseAllMediaPlaybackCompleted event later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
Sets Navigation property.
WKWebViewIOSControlMBS.reloadFromOrigin
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
Sets Navigation property.
WKWebViewIOSControlMBS.removeAllUserScripts
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
WKWebViewIOSControlMBS.removeScriptMessageHandler(Name as String)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
name: The name of the message handler to remove.
WKWebViewIOSControlMBS.requestMediaPlaybackState New in 24.5
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 24.5 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
Calls requestMediaPlaybackStateCompleted event later.
WKWebViewIOSControlMBS.stopLoading
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
WKWebViewIOSControlMBS.takeSnapshot(byref error as NSErrorMBS) as NSImageMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
This is synchronous version which waits for image to be finished.
In case of error the result is nil and error may be set.
See also:
WKWebViewIOSControlMBS.takeSnapshot(tag as string = "")
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
Calls later takeSnapshotCompleted event.
Tag is passed to event to distinguish various snapshot requests.
See also:
WKWebViewIOSControlMBS.userScripts as WKUserScriptMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | WebKit2 | MBS Mac64bit Plugin | 21.0 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
The items on this page are in the following plugins: MBS Mac64bit Plugin.