WKWebViewControlMBS control
Online Documentation - Statistics - FAQ - Plugin Parts (All , Dependencies ) - Class hierarchy
New in Version
22.2
22.3
22.4
22.5
23.0
23.1
23.2
23.3
23.4
23.5
24.0
24.1
The list of the topics ,
classes ,
interfaces ,
controls ,
modules ,
global methods by category ,
global methods by name ,
screenshots ,
licenses
and examples .
Platforms to show: All Mac Windows Linux Cross-Platform
WKWebViewControlMBS control
See also desktop control: DesktopWKWebViewControlMBS
A WKWebView object displays interactive web content, such as for an in-app browser.
Example
// print a WKWebViewControlMBS to PDF file: dim browser as WKWebViewControlMBS // your control showing website Dim pi As NSPrintInfoMBS = NSPrintInfoMBS .sharedPrintInfoDim f As FolderItem = SpecialFolder.Desktop.Child("test.pdf" ) pi.SetSaveDestination fDim po As NSPrintOperationMBS = browser.printOperation(pi) po.showsPrintPanel = False po.showsProgressPanel = False If po.runOperation Then f.launchEnd 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.
48 events
event BoundsChanged
event Close
event Closing
event ConstructContextualMenu (base as MenuItem, x as Integer, y as Integer) as Boolean
event ContextualMenuAction (hitItem as MenuItem) as Boolean
event CreateWebView (URL as String, request as NSURLRequestMBS ) as Variant
event decidePolicyForNavigationAction (navigationAction as WKNavigationActionMBS , decisionHandler as WKPolicyForNavigationActionDecisionHandlerMBS )
event decidePolicyForNavigationResponse (navigationResponse as WKNavigationResponseMBS , decisionHandler as WKPolicyForNavigationResponseDecisionHandlerMBS )
event DidClose
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 DidReceiveAuthenticationChallenge (challenge as NSURLAuthenticationChallengeMBS , byref AuthChallengeDisposition as Integer, byref credentials as NSURLCredentialMBS )
event didReceiveScriptMessage (Body as Variant, name as String)
event didReceiveServerRedirectForProvisionalNavigation (navigation as WKNavigationMBS )
event didStartProvisionalNavigation (navigation as WKNavigationMBS )
event downloadDecideDestinationUsingResponse (download as WKDownloadMBS , response as NSURLResponseMBS , suggestedFilename as String, byref destination as FolderItem)
event downloadDidFailWithError (download as WKDownloadMBS , error as NSErrorMBS , resumeData as MemoryBlock)
event downloadDidFinish (download as WKDownloadMBS )
event downloadDidReceiveAuthenticationChallenge (download as WKDownloadMBS , challenge as NSURLAuthenticationChallengeMBS , byref AuthChallengeDisposition as Integer, byref credentials as NSURLCredentialMBS )
event downloadWillPerformHTTPRedirection (download as WKDownloadMBS , response as NSURLResponseMBS , request as NSURLRequestMBS , byref DownloadRedirectPolicy as Integer)
event EnableMenuItems
event EstimatedProgressChanged (estimatedProgress as double, oldEstimatedProgress as double)
event FocusLost
event FocusReceived
event FrameChanged
event GotFocus
event JavaScriptEvaluated (JavaScript as String, Result as Variant, Error as NSErrorMBS , Tag as String)
event LostFocus
event MenuBarSelected
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 navigationActionDidBecomeDownload (navigationAction as WKNavigationActionMBS , download as WKDownloadMBS )
event navigationResponseDidBecomeDownload (navigationResponse as WKNavigationResponseMBS , download as WKDownloadMBS )
event Open
event Opening
event runJavaScriptAlertPanel (initiatedByFrame as WKFrameInfoMBS , message as String)
event runJavaScriptConfirmPanel (initiatedByFrame as WKFrameInfoMBS , message as String) as boolean
event runJavaScriptTextInputPanel (initiatedByFrame as WKFrameInfoMBS , prompt as String, defaultText as String) as String
event runOpenPanelWithParameters (initiatedByFrame as WKFrameInfoMBS , allowsMultipleSelection as Boolean, allowsDirectories as Boolean)
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 WebContentProcessDidTerminate
event willShowContextualMenu (menu as NSMenuMBS , NSEvent as NSEventMBS )
27 properties
shared property UsePrivateBrowsing as Boolean
23 methods
shared method setUsePrivateBrowsing (value as Boolean)
6 constants
Authentication Challenge Responses
Constant
Value
Description
AuthChallengeCancelAuthenticationChallenge
2
Cancel the entire request. The provided credential parameter is ignored.
AuthChallengePerformDefaultHandling
1
Use the default handling for the challenge as though this delegate method were not implemented. The provided credential parameter is ignored.
AuthChallengeRejectProtectionSpace
3
Reject this challenge, and call the authentication delegate method again with the next authentication protection space. The provided credential parameter is ignored.
AuthChallengeUseCredential
0
Use the specified credential, which may be nil.
Redirect Policy
Constant
Value
Description
DownloadRedirectPolicyAllow
1
Allow a redirect to proceed.
DownloadRedirectPolicyCancel
0
Cancel the redirect action.
Some examples using this control:
Blog Entries
Xojo Developer Magazine
Videos
Release notes
Version 22.3
Changed decidePolicyForNavigationAction event for WKWebViewControlMBS control and WKWebViewIOSControlMBS control to use the decision handler object, so you can decide later or to download. Also navigationAction is now passed with all the details.
Version 22.1
Version 22.0
Added runOpenPanelWithParameters event to WKWebViewControlMBS control and runOpenPanelWithParametersCompleted method to call later with result.
Version 21.0
Version 20.3
Version 20.0
Version 19.5
Version 19.4
Version 19.0
The items on this page are in the following plugins: MBS Mac64bit Plugin .
WinPreviewControlMBS
-
WKWebViewIOSControlMBS