I'm creating a browser extension that works with an SDK that embeds an iframe in a page and then when the extension detects the iframe for the specific domain it sets a variable that tells the SDK that it is able to communicate with the extension. Below is my manifest.json content_scripts property.
"content_scripts": [
{
"matches": [
"https://my.app.url/*"
],
"run_at": "document_idle",
"all_frames": true,
"js": [
"contentScript.js"
]
}
],
This works after I go to the actual link and then accept the request for permissions, but the intent is that it should ask for permissions if it detects the iframe to the domain as well. If I go to a website that has such an iframe I am not asked for content_script permissions. Is this feature supported or will it be supported in the future? Is there something I'm doing wrong?
Here is my Info.plist NSExtension Dict as well.
<key>NSExtension</key>
<dict>
<key>SFSafariContentScript</key>
<array>
<dict>
<key>Script</key>
<string>/contentScript.js</string>
</dict>
</array>
<key>SFSafariWebsiteAccess></key>
<dict>
<key>Level</key>
<string>All</string>
</dict>
</dict>