|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||HTMLViewer Mac||MBS MacControls Plugin||7.2||Yes||No||No||Yes, macOS only||No|
Implementors of this protocol will receive messages indicating that a resource is about to be loaded, data has been received for a resource, an error has been received for a resource, and completion of a resource load.
Implementors are also given the opportunity to mutate requests before they are sent.
The various progress methods of this protocol all receive an identifier as the parameter. This identifier can be used to track messages associated with a single resource. For example, a single resource may generate multiple willSendRequest calls as it's URL is redirected.
All methods in this class will catch exceptions from Cocoa and raise a NSExceptionMBS instead. Using the message, name and reason properties you can see what was the reason for this exception. Please report if you find a method which does not handle exceptions correct.
Please use one delegate class per HTMLViewer (or WebViewMBS) and make sure they live about the same time. Our class keeps a reference on the WebView, so we can remove our delegate when the delegate is destroyed.
- 11 events
- event Close
- event didCancelAuthenticationChallenge(id as Variant, challenge as NSURLAuthenticationChallengeMBS, dataSource as WebDataSourceMBS)
- event didFailLoadingWithError(id as Variant, errorString as string, dataSource as WebDataSourceMBS)
- event didFinishLoadingFromDataSource(id as Variant, dataSource as WebDataSourceMBS)
- event didReceiveAuthenticationChallenge(id as Variant, challenge as NSURLAuthenticationChallengeMBS, dataSource as WebDataSourceMBS)
- event didReceiveContentLength(id as Variant, length as Integer, dataSource as WebDataSourceMBS)
- event didReceiveResponse(id as Variant, response as NSURLResponseMBS, dataSource as WebDataSourceMBS)
- event identifierForInitialRequest(request as NSURLRequestMBS, dataSource as WebDataSourceMBS) as Variant
- event Open
- event plugInFailedWithError(errorString as string, dataSource as WebDataSourceMBS)
- event willSendRequest(id as Variant, request as NSURLRequestMBS, redirectResponse as NSURLResponseMBS, dataSource as WebDataSourceMBS) as NSURLRequestMBS
This class has no sub classes.
Some useful global functions for this class:
Some methods using this class:
- HTMLViewer.InstallWebResourceLoadDelegateMBS(WebResourceLoadDelegate as WebResourceLoadDelegateMBS)
Some examples which use this class:
- /MacControls/HTMLViewer Mac/WebResourceLoadDelegate
- /MacFrameworks/Cocoa Controls/WebView with Delegate
The items on this page are in the following plugins: MBS MacControls Plugin.
MBS Xojo tutorial videos