I'm developing a safari app extension. I've to listen to "beforeNavigate" event as in old Safari JS Extensions, we could listen to these events using Safari's Windows & Tabs API.
I went through the How to create Safari App Extension, but unfortunately couldn't find anything related to these events there.
Can anybody please help me with similar APIs for Safari App Extensions as we had in old Safari JS Extensions.
Starting Safari 13, Apple added an API for page navigation notifications.
In your SafariExtensionHandler.swift
, you can now override func page(_ page: SFSafariPage, willNavigateTo url: URL?).
Source: https://developer.apple.com/documentation/safari_release_notes/safari_13_release_notes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With