Interface nsIURIFixupType

Interface implemented by objects capable of fixing up strings into URIs

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

  • With the host associated with the URI, use nsIDNSService to determine if an IP address can be found for this host. This method will ignore checking hosts that are IP addresses. If the host does not contain any periods, depending on the browser.urlbar.dnsResolveFullyQualifiedNames preference value, a period may be appended in order to make it a fully qualified domain name.

    Throws

    NS_ERROR_FAILURE if aURI does not have a displayHost or asciiHost.

    Parameters

    • aURI: nsIURI

      The URI to parse and pass into the DNS lookup.

    • aListener: nsIDNSListener

      The listener when the result from the lookup is available.

    • aOriginAttributes: any

      The originAttributes to pass the DNS lookup.

    Returns void

  • Given a uri-like string with a protocol, attempt to fix and convert it into an instance of nsIURIFixupInfo.

    Differently from getFixupURIInfo, this assumes the input string is an http/https uri, and can add a prefix and/or suffix to its hostname.

    The scheme will be changed to the scheme defined in "browser.fixup.alternate.protocol", which is by default, https.

    If the prefix and suffix of the host are missing, it will add them to the host using the preferences "browser.fixup.alternate.prefix" and "browser.fixup.alternate.suffix" as references.

    If a hostname suffix is present, but the URI doesn't contain a prefix, it will add the prefix via "browser.fixup.alternate.prefix"

    Returns

    nsIURIFixupInfo A nsIURIFixupInfo object with the property fixedURI which contains the modified URI.

    Throws

    NS_ERROR_FAILURE If aUriString is undefined, or the scheme is not http/https.

    Parameters

    • aUriString: string

      The URI to fixup and convert.

    Returns nsIURIFixupInfo

  • Tries to converts the specified string into a URI, first attempting to correct any errors in the syntax or other vagaries. It returns information about what it corrected (e.g. whether we could rescue the URI or "just" generated a keyword search URI instead).

    Parameters

    • aURIText: string

      Candidate URI.

    • aFixupFlags: number

      Flags that govern ways the URI may be fixed up. Defaults to FIXUP_FLAG_NONE.

    Returns nsIURIFixupInfo

  • Returns true if the specified domain is known and false otherwise. A known domain is relevant when we have a single word and can't be sure whether to treat the word as a host name or should instead be treated as a search term.

    Parameters

    • aDomain: string

      A domain name to query.

    Returns bool

  • Converts the specified keyword string into a URI. Note that it's the caller's responsibility to check whether keywords are enabled and whether aKeyword is a sensible keyword.

    Parameters

    • aKeyword: string

      The keyword string to convert into a URI

    • aIsPrivateContext: boolean

      Whether this is invoked from a private context.

    Returns nsIURIFixupInfo

  • Convert load flags from nsIWebNavigation to URI fixup flags for use in getFixupURIInfo.

    Parameters

    • aURIText: string

      Candidate URI; used for determining whether to allow keyword lookups.

    • aDocShellFlags: number

      Load flags from nsIDocShell to convert.

    Returns number

Generated using TypeDoc