Make clear if an API is available from content scripts or not



Developer Documentation
9 months ago
9 months ago


(Reporter: fabrice, Unassigned)





9 months ago
The list of APIs usable from content scripts is documented at, but when just looking for a given API this information is lost.

For instance, only talks about required permissions, but not about the restriction to background pages.

Ideally we would have more documentation bits (could be some kind of badge) alongside each extension api.
I'm not sure about this. Almost all (at least 90% of) WebExtension APIs are unavailable in content scripts. So I think noting, next to each API, whether it is available has a pretty poor signal to noise ratio.

It's better, I think, just to assume (and document) that the APIs are not available, with a few exceptions (primarily messaging, i18n, and storage). Everyone working with content scripts is going to have to read at some point, and as you say, the supported APIs are listed there.
You need to log in before you can comment on or make changes to this bug.