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

Version Path
gabrielg-xultestrunner-0.2.7 xulapp/chrome/content/vendor/xpcomcore/README
xpcomcore-rubygem-0.6.4 xpcomcore/README
xpcomcore-rubygem-0.6.3 xpcomcore/README
xpcomcore-rubygem-0.6.2 xpcomcore/README
xpcomcore-rubygem-0.6.0 xpcomcore/README
xpcomcore-rubygem-0.5.3 xpcomcore/README
xpcomcore-rubygem-0.5.2 xpcomcore/README
xpcomcore-rubygem-0.5.1 xpcomcore/README
xpcomcore-rubygem-0.5.0 xpcomcore/README
xpcomcore-rubygem-0.3.2 xpcomcore/README
xultestrunner-0.2.9 xulapp/chrome/content/vendor/xpcomcore/README
xultestrunner-0.2.8 xulapp/chrome/content/vendor/xpcomcore/README