Platforms to show: All Mac Windows Linux Cross-Platform
WKWebViewControlMBS control
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
control | WebKit2 | MBS Mac64bit Plugin | 16.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Example:
// print a WKWebViewControlMBS to PDF file:
dim browser as WKWebViewControlMBS // your control showing website
Dim pi As NSPrintInfoMBS = NSPrintInfoMBS.sharedPrintInfo
Dim f As FolderItem = SpecialFolder.Desktop.Child("test.pdf")
pi.SetSaveDestination f
Dim po As NSPrintOperationMBS = browser.printOperation(pi)
po.showsPrintPanel = False
po.showsProgressPanel = False
If po.runOperation Then
f.launch
End If
This is a control to use WebKit in 32-bit and WebKit 2 in 64-bit.
Most of the events provided by Xojo for the control will not work.
But we can add features over time as needed.
Let us know if you need a method from WKWebView or an event from WKNavigationDelegate or WKUIDelegate.
- 30 events
- event BoundsChanged
- event Close
- event CreateWebView(URL as String, request as NSURLRequestMBS) as WKWebViewControlMBS
- event decidePolicyForNavigationAction(URL as String, NavigationType as String, modifierFlags as Integer, buttonNumber as Integer, newWindow as boolean, frameName as string, request as NSURLRequestMBS) as boolean
- event decidePolicyForNavigationResponse(navigationResponse as WKNavigationResponseMBS) as boolean
- event didCloseContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)
- event didCommitNavigation(navigation as WKNavigationMBS)
- event didFailNavigation(navigation as WKNavigationMBS, Error as NSErrorMBS)
- event didFailProvisionalNavigation(navigation as WKNavigationMBS, Error as NSErrorMBS)
- event didFinishNavigation(navigation as WKNavigationMBS)
- event didReceiveScriptMessage(Body as Variant, name as String)
- event didReceiveServerRedirectForProvisionalNavigation(navigation as WKNavigationMBS)
- event didStartProvisionalNavigation(navigation as WKNavigationMBS)
- event EnableMenuItems
- event EstimatedProgressChanged(estimatedProgress as double, oldEstimatedProgress as double)
- event FrameChanged
- event GotFocus
- event JavaScriptEvaluated(JavaScript as String, Result as Variant, Error as NSErrorMBS, Tag as String)
- event LostFocus
- event MenuAction(HitItem as MenuItem) As Boolean
- event MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
- event MouseDrag(x as Integer, y as Integer)
- event MouseUp(x as Integer, y as Integer)
- event runJavaScriptAlertPanel(message as String)
- event runJavaScriptConfirmPanel(message as String) as boolean
- event runJavaScriptTextInputPanel(prompt as String, defaultText as String) as String
- event ScaleFactorChanged(NewFactor as Double)
- event takeSnapshotCompleted(image as NSImageMBS, error as NSErrorMBS, tag as string)
- event TitleChanged(Title as String, oldTitle as string)
- event willShowContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)
- 27 properties
- property AcceptTabs as Boolean
- property allowFileAccessFromFileURLs as Boolean
- property allowsBackForwardNavigationGestures as Boolean
- property allowsLinkPreview as Boolean
- property allowsMagnification as Boolean
- property allowUniversalAccessFromFileURLs as Boolean
- property backForwardList as WKBackForwardListMBS
- property CanGoBack as Boolean
- property CanGoForward as Boolean
- property customUserAgent as String
- property developerExtrasEnabled as Boolean
- property EstimatedProgress as Double
- property hasOnlySecureContent as Boolean
- property IsLoading as Boolean
- property javaEnabled as Boolean
- property javaScriptCanOpenWindowsAutomatically as Boolean
- property javaScriptEnabled as Boolean
- property loadsImagesAutomatically as Boolean
- property magnification as Double
- property minimumFontSize as Double
- property Navigation as WKNavigationMBS
- property plugInsEnabled as Boolean
- property privateBrowsing as Boolean
- property Title as String
- property URL as String
- property View as NSViewMBS
- property WKWebView as WKWebViewMBS
- shared property UsePrivateBrowsing as Boolean
- 22 methods
- method addScriptMessageHandler(Name as String)
- method addUserScript(userScript as WKUserScriptMBS)
- method EvaluateJavaScript(JavaScript as String, byref Error as NSErrorMBS) as Variant
- method EvaluateJavaScript(JavaScript as String, Tag as String = "")
- method goBack
- method goForward
- method goToBackForwardListItem(Item as WKBackForwardListItemMBS)
- method LoadData(Data as MemoryBlock, MIMEType as String, textEncodingName as String, baseURL as string = "")
- method LoadFileURL(File as FolderItem, readAccessItem as FolderItem)
- method LoadHTML(htmlText as String, baseURL as string = "")
- method LoadURL(URL as string)
- method LoadURLRequest(Request as NSURLRequestMBS)
- method printOperation(printInfo as NSPrintInfoMBS) as NSPrintOperationMBS
- method reload
- method reloadFromOrigin
- method removeAllUserScripts
- method removeScriptMessageHandler(Name as String)
- method setMagnification(magnification as double, pointX as double, pointY as double)
- method stopLoading
- method takeSnapshot(byref error as NSErrorMBS) as NSImageMBS
- method takeSnapshot(tag as string = "")
- method userScripts as WKUserScriptMBS()
- shared method setUsePrivateBrowsing(value as Boolean)
Some examples which use this control:
Blog Entries
- MonkeyBread Software Releases the MBS Xojo Plugins in version 21.0
- HTMLViewer JavaScript communication for Xojo
- MonkeyBread Software Releases the MBS Xojo Plugins in version 20.0
- MBS Xojo Plugins, version 20.0r7
- MBS Xojo Plugins, version 19.5pr5
- MonkeyBread Software Releases the MBS Xojo Plugins in version 19.4
- HTMLViewer JavaScript communication for Xojo
- Custom JavaScript messages to WKWebViewControlMBS
- MBS Xojo Plugins, version 17.3pr1
- MonkeyBread Software Releases the MBS Xojo plug-ins in version 17.0
Xojo Developer Magazine
- 19.2, page 10: News
- 19.1, page 10: News
- 18.3, page 18: Xojo Update, The Year In Review and the Year Ahead by Dana Brown
- 17.5, page 41: What's New in the MBS Plugins, With the Plugins growing every year, here are new capabilities you may have missed by Stefanie Juchmes
- 17.2, page 9: News
- 16.2, page 43: Scripting Stock Prices, Taking stock analysis to the next level by Marc Zeedar
- 15.2, page 29: Inside Xojo, Exploring Delegates, WebFile, and WebPicture by Christian Schmitz
The items on this page are in the following plugins: MBS Mac64bit Plugin.
WebViewControlMBS - WKWebViewIOSControlMBS

Links
MBS FileMaker Plugins