Interface mozIOSPreferencesType

Hierarchy

Properties

systemLocale: string

Returns the best locale that the host environment is localized to.

The result is a valid locale ID and it should be used for all APIs that do not handle language negotiation.

In any scenario involving language negotiation, systemLocales should be preferred over the single value.

Example: "zh-Hans-HK"

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 the best possible date/time pattern for the host environment taking into account date/time regional settings user defined in the OS preferences.

    Notice, that depending on the OS it may take into account those settings for all locales, or only if the locale matches the OS locale.

    It takes two integer arguments that must be valid dateTimeFormatStyle* values (see constants defined above), and a string representing a BCP47 locale.

    It returns a string with a LDML date/time pattern.

    If no pattern can be retrieved from the host environment, it will lookup the best available pattern from ICU.

    Notice, this is a pretty unique method in this API in that it does more than look up into host environment. The reason for that is that constructing the right date/time pattern requires a lot of OS-specific logic and it ends up being easier to just handle all scenarios, including with cases where we fail to retrieve anything from the OS, here.

    Parameters

    • timeFormatStyle: number
    • dateFormatStyle: number
    • locale: string

    Returns string

Generated using TypeDoc