Created Using the Firefox add-on code from a bootstrap add-on (markdown)

Richard Newman 2016-12-29 13:27:44 -08:00
parent dab5652248
commit 2d0d1c3284

@ -0,0 +1,27 @@
Thanks to @chrmod for this in #144:
```javascript
function loadDatomish() {
var global = {
datomish: null,
require: function (moduleName) {
var module;
switch (moduleName) {
case 'chrome':
module = {
Components,
};
break;
case 'sdk/timers':
module = {
setTimeout,
}
break;
}
return module;
}
};
Services.scriptloader.loadSubScript("path-to/datomish.js", global);
return global.datomish;
}
```