Chrome Extensions API is older than the Add-on SDK and showing its age. It is stable and somewhat reliable, but lacking some newer and good features:
- Promise-based APIs
-
Task.spawn
andTask.async
- Avoid global listeners (use local communication ports)
- Use object identity instead of _ID_s
- Clear indication of used APIs in a file (like
require()
)
Managing various global listeners is especially inefficient and painful.
I think it is a good idea to put a modernization layer on the top of WebExtensions API, just like the SDK on JSM/XPCOM. It will also ease porting of SDK-based add-ons in the future. (Optionally) Some parts of the layer may be useful to Chromium-based browsers, too.