welcome: please sign in

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
What program is the main source of Conkeror's design philosophy?

location: LoadSpec

The load-spec system is a uniform interface for extracting information such as an URL, a title, and much more, from a variety of different datatypes. Load-specs are used heavily in the browser object system, wherein the commands need to be able to operate not only on DOM nodes, but also html frames and even simple strings.


To use the load-spec system on a datum, cast the datum with the load_spec constructor, like this:

var spec = load_spec(thing);

You can now use load-spec accessors on the object to retrieve its properties without necessarily knowing its datatype. For example:

var uri = load_spec_uri(spec); // returns an nsIURI
var uri_string = load_spec_uri_string(spec); // returns a string
var title = load_spec_title(spec);

Occasionally, you may need to get the original datum out of a load spec.



Since a load-spec can be the container type for a dom node or a document, do not keep global references to load specs. Keeping references to dom nodes in memory prevents Mozilla from garbage-collecting the document that contains the node.