gecko/testing/xpcshell/example/unit/import_sub_module.jsm
Jonathan Protzenko c0260ef7cc Bug 628669: Provide support for relative URLs in Components utils import (JSM, JS modules) r=bsmedberg r=mrbkap
This patch allows a JS module to import another one with a relative path. For
instance, if you have a set of modules you want to drop-in in any extension, and
these modules depend on each other, you can import XPCOMUtils and then do
XPCOMUtils.importRelative(this, "otherfile.jsm").
2011-04-14 00:10:13 +02:00

7 lines
157 B
JavaScript

// Module used by import_module.jsm
var EXPORTED_SYMBOLS = [ "SUBMODULE_IMPORTED", "test_obj" ];
const SUBMODULE_IMPORTED = true;
var test_obj = { i: 0 };