incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gord Tanner <>
Subject Re: Pluginization FTW
Date Thu, 26 Apr 2012 19:26:08 GMT
I would imagine plugins should be able to use the builder code cordova.js
uses to augment or extend namespaces in the dom:


We do need to clean this API up a bit before exposing it to the masses, but
it would be neat if a plugin module could use this to drop objects into the

var objects = { foo: { path: "myplugin/foo"};
var builder = cordova.require('cordova/builder');;

An awesome approach for plugin's would be to not to provide a platform, but
more of a collection of tools (a la unix) that would make it easy for them
to develop.

- cordova.require and cordova.define (they can package themselves as a
module and gateway to use our modules)
- cordova/exec (would be nice to finally refactor out the cordova/bridge
- cordova/utils (toolbox stuff)
- cordova/builder (better API needed for building up dom namespaces, not
required but there to use)

On Thu, Apr 26, 2012 at 3:05 PM, Brian LeRoux <> wrote:

> On Wed, Apr 25, 2012 at 5:29 AM, Drew Walters <> wrote:
> > I would agree that it shouldn't be "necessary" for the addPlugin API
> > (more like addNamespace), however it was nice to have during my
> > development.  If you look at the addPlugin API you'll notice it waits
> > until DOMContentLoaded is fired so that the native browser globals
> > don't overwrite the plugin.  It then calls a modified builder module
> > which handles overriding/merging in the various properties of the
> > plugin.
> Seems like a docs issue more of an API surface issue to me.
> > Without addPlugin/mergePlugin there will certainly be repetition of
> > code and greater potential for plugins to unintentionally override
> > namespace of other plugins.
> could add those to util

Gord Tanner
Senior Developer / Code Poet
tinyHippos Inc.

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