This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
Improve documents: [content scripts] dynamic declarations with dynamic host permissions #5645
Labels
bug
Something on the site is broken!
extensions
Issues related to extensions documentation.
P2
A normal priority task. This is the default for most issues.
Related documents that need to be improved:
See this discussion: scripting.registerContentScripts() when there are no host permissions
There are documents about "Inject content scripts with dynamic declarations". But the doc doesn't say the relationship between
registerContentScripts()
and host permissions. In fact, if there is no host permissions,registerContentScripts()
still execute successfully, but no content scripts will be injected to pages. Therefore, to use dynamic declarations correctly, it needs to cooperate withchrome.permissions.contains()
andchrome.permissions.request()
.The text was updated successfully, but these errors were encountered: