Fx60: Fix issues with JS code modules

- The Mozilla CommonJS loader is no longer available, so bundle the
  Fx52 version of it
- Strict mode is enforced
- `this` is only defined as a global object in .jsm files, not .js files
- `this` can't be converted to a string for BackstagePass test, so check
  for presence of Components.utils.import instead
- The return value from import() is no longer available
This commit is contained in:
Dan Stillman 2018-02-24 04:54:53 -05:00
parent f7854bfcae
commit 78e9db9523
8 changed files with 1164 additions and 14 deletions

View file

@ -161,7 +161,7 @@ Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
.getService(Components.interfaces.mozIJSSubScriptLoader)
.loadSubScript('resource://zotero/require.js');
ZoteroContext = function() {}
var ZoteroContext = function() {}
ZoteroContext.prototype = {
require,