Sha256: 58fce0ed45d6a4e3a2f1282aae51b97083e1c1204b95ca50dc8e6b7d32f3b97b
Contents?: true
Size: 902 Bytes
Versions: 12
Compression:
Stored size: 902 Bytes
Contents
XPCOMCore ========= A standard library like Ruby's, only for JavaScript (with XPCOM access). Installation ============ Check out / submodule in / whatever the code to a place of your choosing. Then load it from an XPCOM component like so: Components.utils.import("resource://app/chrome/content/vendor/xpcomcore/bootstrapper.js"); Then, to pull XPCOMCore into your scope, do this lovely little trick: XPCOMCore({scope: this}); If you wish to not automatically mix in the `Kernel` module, pass another argument like so: XPCOMCore({scope: this, importKernel: false}); Then, whenever you want to make use of XPCOMCore (say, from a XUL window), do the same deal. For example: <script type="text/javascript">XPCOMCore({scope: this});</script> Then you'll have access to methods such as load() and require() and whatever else is defined in Kernel. - Gabriel Gironda
Version data entries
12 entries across 12 versions & 3 rubygems