On Sun, Nov 29, 2015 at 11:39 PM, Fabrice DesrĂ© <[email protected]> wrote:
> Hi Fred,
>
> thanks for starting the discussion on that!
>
>> Below are suggest hookpoint list and reason:
>> ----------------
>> 1. text selection actions
>> allow addon to intercept selected text and make meanningful actions. Ex: 
>> search, find definition
>> 2. Rocketbar instant suggestions
>> allow addon to intercept inputed text and pop related suggestion or result.
>> Ex: weather in orlando, map disney swan hotel
>> (does that reminds anyone the ubiquity addon(2008-2010) from mozilla lab?)
>
> These all look like useful extensions points.
>
> In general, I think each app owner should look at which features we
> want/can make accessible to add-ons and do the appropriate changes we
> need in the apps. One thing to remember is that injected scripts have
> access to the `window` and `document` objects, so anything we leak on
> these will be (ab)used by add-on authors.
>
> That also means that as we make changes to apps, we may have to maintain
> some backward compatibility to not break add-ons written for older
> versions. That's very similar to the situation we know with xul/xpcom
> add-ons: each time we want to make a non-backward compatible change to a
> public xpcom API, we check how many add-ons will be impacted and we warn
> add-on authors in advance. We also may have to enforce a min/max
> compatibility version check when installing add-ons that inject into the
> system app (and possibly all gaia apps).

I think the idea of having gaia app developers think of places in
their apps that addon authors could hook into is a really good one.

But rather than continue to expose the `window` and `document` as a
way to address those, I think we should add dedicated APIs that addon
authors can use.

I think it would be really awesome if we added support for allowing
Gaia apps to implement their own APIs that are exposed to addons.

Something like

fireAddonCallback("callbackName", arg1, arg2, arg3).then((result) => {...});

would go a really long way. Where the argNs and the result are
structured-cloned, allowing them to be passed between the gaia process
and the addon process.

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

Reply via email to