Safari 15.4 Release Notes shows that webpage-to-extension messaging using externally_connectable is supported. https://developer.apple.com/documentation/safari-release-notes/safari-15_4-release-notes
However, when I tried testing it, I was not really able to get it to work. What I have tried:
- Added
matchesarray to the externally_connectable object inmanifest.json - Obtain the
extensionIDusingbrowser.runtime.id - Added listener to
onMessageExternalfor extension - Send a message from a webpage, that is in the
matchesarray, usingchrome.runtime.sendMessagewith theextensionIDobtained above
With these steps, I wasn't able to receive a message sending to the extension. I am not sure if the extensionID is wrong or if I am missing any crucial steps. Can someone please recommend what I should try?