Interface nsIMozIconURIType

nsIIconURI

This interface derives from nsIURI, to provide additional information about moz-icon URIs.

What is a moz-icon URI you ask? Well, it has the following syntax:

moz-icon:[ | // | //stock/]? ['?'[]]

is a valid URL spec.

is any filename with an extension, e.g. "dummy.html". If the file you want an icon for isn't known to exist, you can use this instead of a URL and just place a dummy file name with the extension or content type you want.

is the name of a platform-dependant stock icon.

Legal parameter value pairs are listed below:

Parameter: size Values: [ | button | toolbar | toolbarsmall | menu | dialog] Description: If integer, this is the desired size in square pixels of the icon Else, use the OS default for the specified keyword context.

Parameter: state Values: [normal | disabled] Description: The state of the icon.

Parameter: contentType Values: Description: The mime type we want an icon for. This is ignored by stock images.

Hierarchy

Properties

asciiHost: string

The URI host with an ASCII compatible encoding. Follows the IDNA draft spec for converting internationalized domain names (UTF-8) to ASCII for compatibility with existing internet infrasture.

asciiHostPort: string

The host:port (or simply the host, if port == -1), with an ASCII compatible encoding. Host portion follows the IDNA draft spec. The result is strictly ASCII.

asciiSpec: string

Additional attributes: The URI spec with an ASCII compatible encoding. Host portion follows the IDNA draft spec. Other parts are URL-escaped per the rules of RFC2396. The result is strictly ASCII.

contentType: string
displayHost: string

If the URI has a punycode encoded hostname, this will hold the UTF8 representation of that hostname (if that representation doesn't contain blacklisted characters, and the network.IDN_show_punycode pref is false) Otherwise, if the hostname is ASCII, it will return the same as .asciiHost

displayHostPort: string

The displayHost:port (or simply the displayHost, if port == -1).

displayPrePath: string

Returns the same as calling .prePath, only with a UTF8 encoded hostname (if that hostname doesn't contain blacklisted characters, and the network.IDN_show_punycode pref is false)

displaySpec: string

Returns the same as calling .spec, only with a UTF8 encoded hostname (if that hostname doesn't contain blacklisted characters, and the network.IDN_show_punycode pref is false)

fileExtension: string
filePath: string

Additional attributes added for .query support: Returns a path including the directory and file portions of a URL. For example, the filePath of "http://host/foo/bar.html#baz" is "/foo/bar.html".

Some characters may be escaped.

hasRef: boolean

Returns if there is a reference portion (the part after the "#") of the URI.

host: string

The host is the internet domain name to which this URI refers. It could be an IPv4 (or IPv6) address literal. Otherwise it is an ASCII or punycode encoded string.

hostPort: string

The host:port (or simply the host, if port == -1).

iconSize: string
iconState: string
iconURL: nsIURL
imageSize: number
password: string
pathQueryRef: string

The path, typically including at least a leading '/' (but may also be empty, depending on the protocol).

Some characters may be escaped.

This attribute contains query and ref parts for historical reasons. Use the 'filePath' attribute if you do not want those parts included.

port: number

A port value of -1 corresponds to the protocol's default port (eg. -1 implies port 80 for http URIs).

prePath: string

The prePath (eg. scheme://user:password@host:port) returns the string before the path. This is useful for authentication or managing sessions.

Some characters may be escaped.

query: string

Returns the query portion (the part after the "?") of the URL. If there isn't one, an empty string is returned.

Some characters may be escaped.

ref: string

Additional attribute & methods added for .ref support: Returns the reference portion (the part after the "#") of the URI. If there isn't one, an empty string is returned.

Some characters may be escaped.

scheme: string

The Scheme is the protocol to which this URI refers. The scheme is restricted to the US-ASCII charset per RFC3986.

spec: string

The URI is broken down into the following principal components: Returns a string representation of the URI.

Some characters may be escaped.

specIgnoringRef: string

returns a string for the current URI with the ref element cleared.

stockIcon: string
userPass: string

The username:password (or username only if value doesn't contain a ':')

Some characters may be escaped.

username: string

The optional username and password, assuming the preHost consists of username:password.

Some characters may be escaped.

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

  • Returns an nsIURIMutator that can be used to make changes to the URI. After performing the setter operations on the mutator, one may call mutator.finalize() to get a new immutable URI with the desired properties.

    Returns nsIURIMutator

  • This method resolves a relative string into an absolute URI string, using this URI as the base.

    NOTE: some implementations may have no concept of a relative URI.

    Parameters

    • relativePath: string

    Returns string

  • An optimization to do scheme checks without requiring the users of nsIURI to GetScheme, thereby saving extra allocating and freeing. Returns true if the schemes match (case ignored).

    Parameters

    • scheme: string

    Returns boolean

  • Serializes a URI object to a URIParams data structure in order for being passed over IPC. For deserialization, see nsIURIMutator.

    Parameters

    • aParams: URIParams

    Returns void

Generated using TypeDoc