Last Comment Bug 850449 - Expose 'addon' to scripts matching custom addon-page URIs
: Expose 'addon' to scripts matching custom addon-page URIs
Product: Add-on SDK
Classification: Client Software
Component: General (show other bugs)
: unspecified
: All All
P1 normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: 850451 (view as bug list)
Depends on: 852240 790367 873102
Blocks: sdk/addon-page
  Show dependency treegraph
Reported: 2013-03-12 15:29 PDT by Wes Kocher (:KWierso)
Modified: 2013-05-30 10:00 PDT (History)
5 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Pull request 851 (165 bytes, text/html)
2013-03-12 16:59 PDT, Alexandre Poirot [:ochameau]
myk: feedback+
rFobic: feedback-

Description User image Wes Kocher (:KWierso) 2013-03-12 15:29:06 PDT
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.
Comment 1 User image Wes Kocher (:KWierso) 2013-03-12 15:33:26 PDT
*** Bug 850451 has been marked as a duplicate of this bug. ***
Comment 2 User image Alexandre Poirot [:ochameau] 2013-03-12 16:59:08 PDT
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");

Irakli, Would you bless such new high-level feature?
Comment 3 User image Myk Melez [:myk] [@mykmelez] 2013-03-13 10:13:30 PDT
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.
Comment 4 User image Dave Townsend [:mossop] 2013-05-16 09:32:01 PDT
Looks like addon-page is going to be dropped in australis so we probably don't need to work on this bug anymore

Note You need to log in before you can comment on or make changes to this bug.