The CometD project just announced their first 2.5 beta, which adds AMD support to their Dojo-based JavaScript client, as well as their jQuery client with an AMD loader.
The release notes contain full details. They have set things up such that it will work with AMD syntax, and still work with the legacy dojo.require/dojo.provide syntax.
If you are using the require/provide syntax, you need to register a module path prior to requiring dojox.cometd:
dojo.registerModulePath("org", "../org");
dojo.require("dojox.cometd");
For AMD applications, either use the “tlmSiblingsOfDojo: true̶...
作成日: 2012-05-22 03:51:48