nsIStyleSheetService

IID:41d979dc-ea03-4235-86ff-1e3c090c5630
Inherits From:nsISupports

This interface is intended to be used as a service. To create an object implementing this interface:

var obj = Components.classes["@mozilla.org/content/style-sheet-service;1"].
            getService(Components.interfaces.nsIStyleSheetService);

This interface is implemented by the following components:


Constants

PRUint32 AGENT_SHEET = 0
PRUint32 USER_SHEET = 1

Methods

void loadAndRegisterSheet ( nsIURI sheetURI , PRUint32 type ) PRBool sheetRegistered ( nsIURI sheetURI , PRUint32 type ) void unregisterSheet ( nsIURI sheetURI , PRUint32 type )

void loadAndRegisterSheet ( nsIURI sheetURI , PRUint32 type )

Synchronously loads a style sheet from sheetURI and adds it to the list of user or agent style sheets.

A user sheet loaded via this API will come before userContent.css and userChrome.css in the cascade (so the rules in it will have lower precedence than rules in those sheets).

An agent sheet loaded via this API will come after ua.css in the cascade (so the rules in it will have higher precedence than rules in ua.css).

The relative ordering of two user or two agent sheets loaded via this API is undefined.

Arguments:
sheetURI
type

PRBool sheetRegistered ( nsIURI sheetURI , PRUint32 type )

Returns true if a style sheet at sheetURI has previously been added to the list of style sheets specified by type.

Arguments:
sheetURI
type

void unregisterSheet ( nsIURI sheetURI , PRUint32 type )

Remove the style sheet at sheetURI from the list of style sheets specified by type. All documents loaded after this call will no longer use the style sheet.

Arguments:
sheetURI
type

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com