Globals in this section are subject to change in the future and/or are likely to be of interest to SDK module developers, rather than add-on developers.
To access the infamous and powerful
Components object, see the
Chrome Authority documentation.
__url__ global is a string identifying the URL from which the code has
been retrieved. If the code has no identifiable URL, this value may be
For more information on packaging, see the Package Specification appendix.
packaging global contains methods and metadata related to
the packages available in the current environment.
Given a unix-style path relative to the calling package's
directory, returns an absolute URL to the file or directory.
By "calling package", we mean the package in which the caller's source code resides.
Thus, for example, if a package contains a resource at
data/mydata.dat and a module at
lib/foo.js, the module at
lib/foo.js may make the following call to retrieve an absolute URL
var myDataURL = packaging.getURLForData("/mydata.dat");
If the calling package has no
data directory, an exception is
memory is an object that exposes functionality to track
objects of interest and help diagnose and prevent memory leaks.
Marks object for being tracked, and categorizes it with the given
bin name. If bin isn't specified, the memory tracker attempts to
infer a bin name by first checking the object's
constructor.name; if that fails or results in the generic
Object, the stack is inspected and the name of the current
function being executed—which is assumed to be a constructor
function—is used. If that fails, then the object is placed in a
Array containing information about tracked objects
that have been categorized with the given bin name. If bin isn't
provided, information about all live tracked objects are returned.
Each element of the array is an object with the following keys:
||A weak reference to the object being tracked. Call
||The name of the file that called
||The line number of the file that called
Array containing the names of all bins that aren't