webView(_:print:)
Prints the contents of a web frame view.
Declaration
optional func webView(_ sender: WebView!, print frameView: WebFrameView!)Parameters
- sender:
The web view that sent the message.
- frameView:
The web frame view whose contents to print.
Discussion
This method is invoked when a script or a user wants to print a webpage. Typically, the delegate implements this method to prepare the web frame view content for printing. The web frame view can handle some content without intervention by the delegate. Send the documentViewShouldHandlePrint message to the web frame view to determine if it can handle printing. If this method returns true, then the delegate can print the content by sending the printDocumentView() message to the web frame view. Otherwise, the delegate can use printOperation(with:) to get an NSPrintOperation object to print the web frame view.