evaluateURL(_:mainDocumentURL:completionHandler:)
Declaration
func evaluateURL(_ url: URL, mainDocumentURL: URL?, completionHandler: @escaping @Sendable (Bool, Data?) -> Void)func evaluateURL(_ url: URL, mainDocumentURL: URL?) async -> (Bool, Data?)Parameters
- url:
The URL to be evaluated.
- mainDocumentURL:
The URL of the main document, also the root URL of the transitive trust policy
- completionHandler:
The completion block to be invoked when evaluation is complete.
Discussion
Evaluates whether a URL should be blocked and if yes, provides a response body representing the HTML of the blocking content that will be displayed in either the blocked main document or blocked subframe.