Note that you lose the XPCNativeWrappers protection when using this method (i.e. the page can pass an arbitrary JS object to your observer), which is definitely not recommended thing to do. Especially since with this method you can't tell what page the notification originated from (which may be quite bad on its own).
Also I don't see the point - why would one need this instead of the simpler and more safe solution relying on the DOM? Nickolay On 2/5/07, Alex Vincent <[EMAIL PROTECTED]> wrote: > Alternatively, if your extension has a "messenger" global object, and you > add an appropriate observer, you can skip the events model altogether: > > http://weblogs.mozillazine.org/weirdal/archives/016492.html > > > On 2/5/07, Nickolay Ponomarev <[EMAIL PROTECTED] > wrote: > > > > On 2/5/07, Masry Alex <[EMAIL PROTECTED] > wrote: > > > what's the best way to let the page( website, document) communicate with > > > the extension and receive replies back without changing the URI? > > > > Via DOM events. > > > > > http://forums.mozillazine.org/viewtopic.php?p=1005555#1005555 > > > > Nickolay > > _______________________________________________ > > Project_owners mailing list > > [email protected] > > http://mozdev.org/mailman/listinfo/project_owners > > > > > > -- > "The first step in confirming there is a bug in someone else's work is > confirming there are no bugs in your own." > -- Alexander J. Vincent, June 30, 2001 > _______________________________________________ > Project_owners mailing list > [email protected] > http://mozdev.org/mailman/listinfo/project_owners > > _______________________________________________ Project_owners mailing list [email protected] http://mozdev.org/mailman/listinfo/project_owners
