I could be wrong, but do add-ons have access to wrappedJSObject? Isn’t that 
chrome (system principal) only? I understood that this is not available in 
add-ons since add-ons use the principal of the page they are injecting into 
(and sandboxed using cu.sandbox). Am I wrong about that? Or is this something 
that is explicitly made available in to add-ons?

My understanding was that the only option for intercommunication between add-on 
and page scripts was to use window.postMessage. Was I wrong about that?


> On 9 Nov 2015, at 6:49 am, Michael Henretty <[email protected]> wrote:
> 
> 
> On Mon, Nov 9, 2015 at 12:31 PM, Kumar Rishav <[email protected] 
> <mailto:[email protected]>> wrote:
> I meant, if i want to use some method of an object (which belong to host 
> app), Do i have to include that 
> file name (where that method resides) in the content_Script ?
> 
> 
> Ah I see. No, don't do that. The script you are including and the one from 
> the hosted app will live in two different worlds and so won't be compatible 
> with each other, no the rest of the webapp. Try using wrappedJSObject.
> _______________________________________________
> dev-fxos mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-fxos

_______________________________________________
dev-fxos mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-fxos

Reply via email to