cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Mocny <>
Subject Re: JS Symbols
Date Wed, 06 Feb 2013 16:48:51 GMT
I like the proposal, and do think our extensions should be namespaced.
 However, your one example of InAppBrowser is debatable if it is a polyfill
or extension, and has good arguments for either side.  So, perhaps we can
leave that example (or any other specific plugin) aside, and focus on the
overall proposal.

I would prefer cordova.plugins instead of directly on cordova.

I also think it would be nice for devs to discover cordova extensions in
web inspector by just typing cordova.plugins. and see whats available.


On Wed, Feb 6, 2013 at 11:33 AM, Andrew Grieve <> wrote:

> Some of our APIs are meant to be polyfills, and some of them are not.
> It's great to expose the polyfill-type ones using the standards-based
> symbols. E.g. FileEntry, requestFileSystem.
> For the custom ones though, I think it's important for devs to realize that
> the APIs they are using are custom to Cordova, and will never work in other
> browsers.
> Examples:
> Camera: window.Camera
> InAppBrowser:
> globalization: navigator.globalization
> There's been some talk about deprecating the window.plugins namespace. But
> why? I think it would be clearer if these apis were:
> Camera:
> InAppBrowser:
> globalization: plugins.globalization
> This makes it much more clear that the APIs are not browser-based ones, but
> Cordova-specific.
> If the rational to get rid of the plugins is to save on a global symbol,
> how about using cordova as the namespace?
> corodva.globalization.getLocale()
> aka:
> cordova.$PLUGIN_NAME.exports
> Thoughts?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message