Skip to content

Instantly share code, notes, and snippets.

@steveluscher
Created August 11, 2011 16:56
Show Gist options
  • Select an option

  • Save steveluscher/1140173 to your computer and use it in GitHub Desktop.

Select an option

Save steveluscher/1140173 to your computer and use it in GitHub Desktop.
A Mojo->Dojo connector; re-implement these methods in another library, and you can use Mojo 2.0 without Dojo.
/* Mojo-Dojo connector */
(function() {
if(typeof mojo == 'undefined') mojo = {};
mojo.addOnUnload = dojo.addOnUnload;
mojo.clone = dojo.clone;
mojo.config = dojo.config;
mojo.connect = dojo.connect;
mojo.declare = dojo.declare;
mojo.destroyElement = dojo._destroyElement;
mojo.disconnect = dojo.disconnect;
mojo.hasClass = dojo.hasClass;
mojo.hitch = dojo.hitch;
mojo.isArray = dojo.isArray;
mojo.isObject = dojo.isObject;
mojo.isString = dojo.isString;
mojo.place = dojo.place;
mojo.provide = dojo.provide;
mojo.publish = dojo.publish;
mojo.query = dojo.query;
mojo.registerModulePath = dojo.registerModulePath;
mojo.require = dojo.require;
mojo.string = dojo.string;
mojo.style = dojo.style;
mojo.subscribe = dojo.subscribe;
mojo.unsubscribe = dojo.unsubscribe;
})();
@jbueza
Copy link

jbueza commented Sep 4, 2011

https://gist.github.com/1192286

mojo.define("app.controller.RegistrationController", {
  addObservers: function() {

  },
  addCommands: function() {

  },
  addIntercepts: function() {

  }
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment