load(_:mimeType:characterEncodingName:baseURL:)
Loads the content of the specified data object and navigates to it.
Declaration
func load(_ data: Data, mimeType MIMEType: String, characterEncodingName: String, baseURL: URL) -> WKNavigation?Parameters
- data:
The data to use as the contents of the webpage.
- MIMEType:
The MIME type of the information in the
dataparameter. This parameter must not contain an empty string. - characterEncodingName:
The data’s character encoding name.
- baseURL:
A URL that you use to resolve relative URLs within the document.
Return Value
A new navigation object for tracking the request.
Discussion
Use this method to navigate to a webpage that you loaded yourself and saved in a data object. For example, if you previously wrote HTML content to a data object, use this method to navigate to that content.