Platforms to show: All Mac Windows Linux Cross-Platform
WKWebViewControlMBS.BoundsChanged
Function:
The event called when the bounds, but not the frame, changed.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
WKWebViewControlMBS.Close
Function:
The webviewer should close.
Notes:
Notifies your app that the DOM window object's close() method completed successfully.
Your app should remove the web view from the view hierarchy and update the UI as needed, such as by closing the containing browser tab or window.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 20.0 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
Notifies your app that the DOM window object's close() method completed successfully.
Your app should remove the web view from the view hierarchy and update the UI as needed, such as by closing the containing browser tab or window.
WKWebViewControlMBS.CreateWebView(URL as String, request as NSURLRequestMBS) as WKWebViewControlMBS
Function:
Creates a new web view.
Notes:
If needed we can add configuration, windowFeatures and navigationAction parameters in future version.
Return a web viewer control or nil.
The web view returned must be created with the specified configuration. WebKit will load the request in the returned web view.
If you do not implement this method or return nil, the web view will cancel the navigation.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 20.0 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
If needed we can add configuration, windowFeatures and navigationAction parameters in future version.
Return a web viewer control or nil.
The web view returned must be created with the specified configuration. WebKit will load the request in the returned web view.
If you do not implement this method or return nil, the web view will cancel the navigation.
WKWebViewControlMBS.decidePolicyForNavigationAction(URL as String, NavigationType as String, modifierFlags as Integer, buttonNumber as Integer, newWindow as boolean, frameName as string, request as NSURLRequestMBS) as boolean
Function:
Decides whether to allow or cancel a navigation.
Notes:
Return true to cancel or false to allow.
URL is the URL to load.
NavigationType defines what navigation is happening: LinkClicked, FormSubmitted, BackForward, Reload, FormResubmitted or Other.
modifierFlags: The keyboard modifiers.
buttonNumber: Which mouse button was clicked: 0 for left button, 1 for middle button, 2 for right button
newWindow: True if a new window should be opened or false if not.
frameName: The frame name. (32-bit only)
request: the URL request. (added in v20.0)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 16.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
Return true to cancel or false to allow.
URL is the URL to load.
NavigationType defines what navigation is happening: LinkClicked, FormSubmitted, BackForward, Reload, FormResubmitted or Other.
modifierFlags: The keyboard modifiers.
buttonNumber: Which mouse button was clicked: 0 for left button, 1 for middle button, 2 for right button
newWindow: True if a new window should be opened or false if not.
frameName: The frame name. (32-bit only)
request: the URL request. (added in v20.0)
WKWebViewControlMBS.decidePolicyForNavigationResponse(navigationResponse as WKNavigationResponseMBS) as boolean
Function:
Decides whether to allow or cancel a navigation after its response is known.
Notes:
navigationResponse: Descriptive information about the navigation response.
Return true to block or return false to allow.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 20.0 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
navigationResponse: Descriptive information about the navigation response.
Return true to block or return false to allow.
WKWebViewControlMBS.didCloseContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)
Function:
Will close contextual menu.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 21.0 | ✅ Yes | ❌ No | ❌ No | ❌ No |
WKWebViewControlMBS.didCommitNavigation(navigation as WKNavigationMBS)
Function:
Invoked when content starts arriving for the main frame.
Notes:
Added navigation parameter with version 20.3.
Sets Navigation property.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 17.0 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
Added navigation parameter with version 20.3.
Sets Navigation property.
WKWebViewControlMBS.didFailNavigation(navigation as WKNavigationMBS, Error as NSErrorMBS)
Function:
Invoked when an error occurs during a committed main frame navigation.
Notes:
Added navigation parameter with version 20.3.
Sets Navigation property.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 17.0 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
Added navigation parameter with version 20.3.
Sets Navigation property.
WKWebViewControlMBS.didFailProvisionalNavigation(navigation as WKNavigationMBS, Error as NSErrorMBS)
Function:
Invoked when an error occurs while starting to load data for the main frame.
Notes:
Added navigation parameter with version 20.3.
Sets Navigation property.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 17.0 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
Added navigation parameter with version 20.3.
Sets Navigation property.
WKWebViewControlMBS.didFinishNavigation(navigation as WKNavigationMBS)
Function:
Invoked when a main frame navigation completes.
Notes:
Added navigation parameter with version 20.3.
Sets Navigation property.
Same as DocumentComplete in HTMLViewer.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 17.0 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
Added navigation parameter with version 20.3.
Sets Navigation property.
Same as DocumentComplete in HTMLViewer.
WKWebViewControlMBS.didReceiveScriptMessage(Body as Variant, name as String)
Function:
Invoked when a script message is received from a webpage.
Notes:
body: The body of the message. Automatic translated from Javascript types.
name: The name of the message handler to which the message is sent.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 18.0 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
body: The body of the message. Automatic translated from Javascript types.
name: The name of the message handler to which the message is sent.
WKWebViewControlMBS.didReceiveServerRedirectForProvisionalNavigation(navigation as WKNavigationMBS)
Function:
Invoked when a server redirect is received for the main frame.
Notes:
Added navigation parameter with version 20.3.
Sets Navigation property.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 17.0 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
Added navigation parameter with version 20.3.
Sets Navigation property.
WKWebViewControlMBS.didStartProvisionalNavigation(navigation as WKNavigationMBS)
Function:
Invoked when a main frame navigation starts.
Notes:
Added navigation parameter with version 20.3.
Sets Navigation property.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 17.0 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
Added navigation parameter with version 20.3.
Sets Navigation property.
WKWebViewControlMBS.EnableMenuItems
Function:
The event where you can enable menu items.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
WKWebViewControlMBS.EstimatedProgressChanged(estimatedProgress as double, oldEstimatedProgress as double)
Function:
The estimated progress for loading the webpage changed.
Notes: This event may be called often, so don't do much here!
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes: This event may be called often, so don't do much here!
WKWebViewControlMBS.FrameChanged
Function:
The event called when the frame changed.
Notes: This event notifies you, that the control changed it's bounding frame, which is position and/or size.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes: This event notifies you, that the control changed it's bounding frame, which is position and/or size.
WKWebViewControlMBS.GotFocus
Function:
The control itself got focus.
Notes: This only fires if the control itself got focus and not a sub control.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes: This only fires if the control itself got focus and not a sub control.
WKWebViewControlMBS.JavaScriptEvaluated(JavaScript as String, Result as Variant, Error as NSErrorMBS, Tag as String)
Function:
JavaScript was evaluated.
Notes:
Error is only set with 64-bit, not with 32-bit.
Tag is passed from EvaluateJavaScript call.
Result is converted from JavaScript data types to Xojo datatypes, usually variants, dictionaries or array of variants.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 16.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
Error is only set with 64-bit, not with 32-bit.
Tag is passed from EvaluateJavaScript call.
Result is converted from JavaScript data types to Xojo datatypes, usually variants, dictionaries or array of variants.
WKWebViewControlMBS.LostFocus
Function:
The control lost focus.
Notes: This only fires if the control itself lost focus and not a sub control.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes: This only fires if the control itself lost focus and not a sub control.
WKWebViewControlMBS.MenuAction(HitItem as MenuItem) As Boolean
Function:
Called when a menuitem is choosen.
Notes: This allows the control to react on its relevant menu items. Please return true if you handled it or false to give others a chance.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes: This allows the control to react on its relevant menu items. Please return true if you handled it or false to give others a chance.
WKWebViewControlMBS.MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
Function:
The mouse button was pressed inside the control’s region at the location passed in to x, y.
Notes:
The coordinates x and y are local to the control, i.e. they represent the position of the mouse click relative to the upper-left corner or the Control.
Return True if you are going to handle the MouseDown. In such a case:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
The coordinates x and y are local to the control, i.e. they represent the position of the mouse click relative to the upper-left corner or the Control.
Return True if you are going to handle the MouseDown. In such a case:
- The Action event, if any, will not execute and the state of the object will not change.
- You will receive the MouseDrag and MouseUp events.
WKWebViewControlMBS.MouseDrag(x as Integer, y as Integer)
Function:
This event fires continuously after the mouse button was pressed inside the Control.
Notes:
Mouse location is local to the control passed in to x, y.
As this event is fired continuously (hundreds of time per second), it is your responsibility to determine if the mouse has really moved.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
Mouse location is local to the control passed in to x, y.
As this event is fired continuously (hundreds of time per second), it is your responsibility to determine if the mouse has really moved.
WKWebViewControlMBS.MouseUp(x as Integer, y as Integer)
Function:
The mouse button was released.
Notes: Use the x and y parameters to determine if the mouse button was released within the control's boundaries.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes: Use the x and y parameters to determine if the mouse button was released within the control's boundaries.
WKWebViewControlMBS.runJavaScriptAlertPanel(message as String)
Function:
Displays a JavaScript alert panel.
Notes:
message: The message to display.
If you do not implement this method, the web view will behave as if the user selected the OK button.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 16.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
message: The message to display.
If you do not implement this method, the web view will behave as if the user selected the OK button.
WKWebViewControlMBS.runJavaScriptConfirmPanel(message as String) as boolean
Function:
Displays a JavaScript confirm panel.
Notes:
message: The message to display.
Return true if the user chose OK, false if the user chose Cancel.
If you do not implement this method, the web view will behave as if the user selected the Cancel button.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 16.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
message: The message to display.
Return true if the user chose OK, false if the user chose Cancel.
If you do not implement this method, the web view will behave as if the user selected the Cancel button.
WKWebViewControlMBS.runJavaScriptTextInputPanel(prompt as String, defaultText as String) as String
Function:
Displays a JavaScript text input panel.
Notes:
message: The message to display.
defaultText: The initial text to display in the text entry field.
Return the entered text if the user chose OK, otherwise "".
If you do not implement this method, the web view will behave as if the user selected the Cancel button.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 16.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
message: The message to display.
defaultText: The initial text to display in the text entry field.
Return the entered text if the user chose OK, otherwise "".
If you do not implement this method, the web view will behave as if the user selected the Cancel button.
WKWebViewControlMBS.ScaleFactorChanged(NewFactor as Double)
Function:
The backing store scale factor has changed.
Notes: Please invalidate any cached bitmaps or other relevant state.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes: Please invalidate any cached bitmaps or other relevant state.
WKWebViewControlMBS.takeSnapshotCompleted(image as NSImageMBS, error as NSErrorMBS, tag as string)
Function:
Called when snapshot of website is completed.
Notes: If snapshot creation failed, error is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 17.4 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes: If snapshot creation failed, error is set.
WKWebViewControlMBS.TitleChanged(Title as String, oldTitle as string)
Function:
The title of the webpage changed.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | WebKit2 | MBS Mac64bit Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ❌ No |
The items on this page are in the following plugins: MBS Mac64bit Plugin.

Links
MBS Xojo PDF Plugins