On 23-10-2014 11:40, Iovene, Salvatore wrote:
Hi,
If in my extension's JS file I add objects to the `exports` object,
they get added to `window.myExtension`.
So `exports.foo = something` means that a user of my extension will be
able to use `window.myExtension.foo`.
However, I'd like to export things to the `navigator` object, as it's
required from the specification I'm implementing.
Is there a way to do that?
On the C extensions [1] you just do navigator.foo = function() {}
and set a entry point at "navigator.foo". Extensions are dynamically
loaded when the user touches the extension namespace (i.e.
window.myExtension). If you have an entry point outside the extension
namespace you have to explicitly declare it.
I suppose that the Android extensions have a similar interface for that.
[1] xwalk/extensions/test/multiple_entry_points_extension.c
Br,
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help