It'd be nice to expose the addon object to page scripts similar to trusted page content in panels, so the scripts can communicate back to the main addon script without attaching a content script.
Created attachment 724213 [details] Pull request 851 Myk, would something like this ease the usage of addon-page? We are automagically exposing an `addon` global object that act exactly like `self` in content scripts but injected directly into all addon page documents. Then you can send and receive page events with : let page = require("sdk/addon-page"); page.on("message",...); page.postMessage() page.port.on(...); page.port.emit(...); Irakli, Would you bless such new high-level feature?
Comment on attachment 724213 [details] Pull request 851 Yes, that would indeed make addon-page easier to use! It would enable me to eliminate a whole layer of the stack.
Looks like addon-page is going to be dropped in australis so we probably don't need to work on this bug anymore