Platforms to show: All Mac Windows Linux Cross-Platform

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
Function: Adds a script message handler.
Example:
// register once
browser.addScriptMessageHandler "test"
// later use in javascript:
browser.EvaluateJavaScript("window.webkit.messageHandlers.test.postMessage('Hello');")
Notes:
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.

Feedback, Comments & Corrections

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
Function: Adds an user script.

Feedback, Comments & Corrections

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
Function: Evaluates JavaScript.
Example:
Dim e As NSErrorMBS

// returns array of variants with doubles
Dim v As Variant = WKWebViewIOSControlMBS1.EvaluateJavaScript("o = [1,2,3];", e)
Dim vd() As Variant = v

// returns array of variants with strings
Dim vv As Variant = WKWebViewIOSControlMBS1.EvaluateJavaScript("o = [""a"",""b"",""d""];", e)
Dim vs() As Variant = vv

// returns dictionary
Dim v3 As Variant = WKWebViewIOSControlMBS1.EvaluateJavaScript("o = {a:1}", e)
Dim dd As Dictionary = v3

Break
Notes:
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:

Feedback, Comments & Corrections

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
Function: Evaluates JavaScript.
Notes:
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:

Feedback, Comments & Corrections

WKWebViewIOSControlMBS.goBack
Type Topic Plugin Version macOS Windows Linux iOS Targets
method WebKit2 MBS Mac64bit Plugin 21.0 ❌ No ❌ No ❌ No ✅ Yes iOS only
Function: Navigates to the back item in the back-forward list.
Notes: Sets Navigation property.

Feedback, Comments & Corrections

WKWebViewIOSControlMBS.goForward
Type Topic Plugin Version macOS Windows Linux iOS Targets
method WebKit2 MBS Mac64bit Plugin 21.0 ❌ No ❌ No ❌ No ✅ Yes iOS only
Function: Navigates to the forward item in the back-forward list.
Notes: Sets Navigation property.

Feedback, Comments & Corrections

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
Function: Navigates to an item from the back-forward list and sets it as the current item.
Notes:
item: The item to which to navigate. Must be one of the items in the web view's back-forward list.

Sets Navigation property.

Feedback, Comments & Corrections

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
Function: Sets the webpage contents and base URL.
Example:
Dim browser As WKWebViewIOSControlMBS // your instance

browser.LoadData "<p>Hello World</p>", "text/html", "UTF-8", ""
Notes:
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.

Feedback, Comments & Corrections

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
Function: Navigates to a requested file.
Notes:
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.

Feedback, Comments & Corrections

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
Function: Sets the webpage contents and base URL.
Example:
Dim browser As WKWebViewIOSControlMBS // your instance

browser.LoadHTML "<p>Hello World</p>"
Notes:
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.

Feedback, Comments & Corrections

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
Function: Navigates to a requested URL.
Example:
Dim browser As WKWebViewIOSControlMBS // your instance

call browser.LoadURL "https://www.mbs-plugins.de/"
Notes:
Sets Navigation property.
Sets Navigation property.

Feedback, Comments & Corrections

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
Function: Navigates to a requested URL.
Notes: Sets Navigation property.

Feedback, Comments & Corrections

WKWebViewIOSControlMBS.reload
Type Topic Plugin Version macOS Windows Linux iOS Targets
method WebKit2 MBS Mac64bit Plugin 21.0 ❌ No ❌ No ❌ No ✅ Yes iOS only
Function: Reloads the current page.
Example:
Public Sub Reload(browser as WKWebViewIOSControlMBS, force as Boolean)
If force Then
Call browser.reloadFromOrigin
Else
Call browser.reload
End If
End Sub
Notes: Sets Navigation property.

Feedback, Comments & Corrections

WKWebViewIOSControlMBS.reloadFromOrigin
Type Topic Plugin Version macOS Windows Linux iOS Targets
method WebKit2 MBS Mac64bit Plugin 21.0 ❌ No ❌ No ❌ No ✅ Yes iOS only
Function: Reloads the current page, performing end-to-end revalidation using cache-validating conditionals if possible.
Example:
Public Sub Reload(browser as WKWebViewIOSControlMBS, force as Boolean)
If force Then
call browser.reloadFromOrigin
Else
call browser.reload
End If
End Sub
Notes: Sets Navigation property.

Feedback, Comments & Corrections

WKWebViewIOSControlMBS.removeAllUserScripts
Type Topic Plugin Version macOS Windows Linux iOS Targets
method WebKit2 MBS Mac64bit Plugin 21.0 ❌ No ❌ No ❌ No ✅ Yes iOS only
Function: Removes all associated user scripts.
Example:
Dim browser As WKWebViewIOSControlMBS // your instance

browser.removeAllUserScripts

Feedback, Comments & Corrections

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
Function: Removes a script message handler.
Notes: name: The name of the message handler to remove.

Feedback, Comments & Corrections

WKWebViewIOSControlMBS.stopLoading
Type Topic Plugin Version macOS Windows Linux iOS Targets
method WebKit2 MBS Mac64bit Plugin 21.0 ❌ No ❌ No ❌ No ✅ Yes iOS only
Function: Stops loading all resources on the current page.
Example:
Dim browser As WKWebViewIOSControlMBS // your instance

browser.stopLoading

Feedback, Comments & Corrections

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
Function: Requests a snapshot.
Notes:
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:

Feedback, Comments & Corrections

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
Function: Requests a snapshot.
Notes:
Calls later takeSnapshotCompleted event.
Tag is passed to event to distinguish various snapshot requests.

See also:

Feedback, Comments & Corrections

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
Function: The user scripts associated with the user content controller.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Mac64bit Plugin.

The biggest plugin in space...




Links
MBS FileMaker Plugins

Start Chat