SafariExtensions
SafariExtensions copied to clipboard
Safari app extension message listener not called in cross-origin iframe when top frame is denied permissions
Steps to reproduce:
- Run the attached sample Xcode project MessageBug
- In Safari, allow the MessageBug extension on all websites
- Open https://lapcatsoftware.com/articles/2023/2/1.html
- In Safari Website Settings, deny the MessageBug extension on
lapcatsoftware.com
- Reload https://lapcatsoftware.com/articles/2023/2/1.html
Here's the console log after step 3:
And here's the console log after step 5:
The YouTube iframe should receive a message from the native SafariExtensionHandler
, but it doesn't, even though the content script runs in the iframe, and the SFSafariExtensionHandler
delegate method is called, as verified by the Console log.