Interface nsIStyleSheetServiceType

nsIStyleSheetService allows extensions or embeddors to add to the built-in list of user or agent style sheets.

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • 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.

    Sheets added via this API take effect on all documents, including already-loaded ones, immediately.

    Parameters

    • sheetURI: nsIURI
    • type: number

    Returns void

  • Synchronously loads a style sheet from |sheetURI| and returns the new style sheet object. Can be used with nsIDOMWindowUtils.addSheet.

    Parameters

    • sheetURI: nsIURI
    • type: number

    Returns nsIPreloadedStyleSheet

  • Asynchronously loads a style sheet from |sheetURI| and returns a Promise which resolves to the new style sheet object, which can be used with nsIDOMWindowUtils.addSheet, when it has completed loading.

    Parameters

    • sheetURI: nsIURI
    • type: number

    Returns any

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

    Parameters

    • sheetURI: nsIURI
    • type: number

    Returns boolean

  • Remove the style sheet at |sheetURI| from the list of style sheets specified by |type|. The removal takes effect immediately, even for already-loaded documents.

    Parameters

    • sheetURI: nsIURI
    • type: number

    Returns void

Generated using TypeDoc