load(_:)
Loads the web content that the specified URL request object references and navigates to that content.
Declaration
@discardableResult @MainActor final func load(_ request: URLRequest) -> some AsyncSequence<WebPage.NavigationEvent, any Error>
Parameters
- request:
A URL request that specifies the resource to display.
Return Value
An async sequence you use to track the loading progress of the navigation. If the Task enclosing the sequence is cancelled, the page will stop loading all resources.
Discussion
Use this method to load a page from a local or network-based URL. For example, you might use this method to navigate to a network-based webpage.
Provide the source of this load request for app activity data by setting the attribution parameter on your request.