Intl.ListFormat.prototype.resolvedOptions()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2021.

The resolvedOptions() method of Intl.ListFormat instances returns a new object with properties reflecting the options computed during initialization of this ListFormat object.

Try it

const deListFormatter1 = new Intl.ListFormat("de-DE", { type: "disjunction" });
const options1 = deListFormatter1.resolvedOptions();

console.log(options1.locale);
// Expected output (Firefox / Safari): "de-DE"
// Expected output (Chrome): "de"

console.log(options1.style);
// Expected output: "long"

console.log(options1.type);
// Expected output: "disjunction"

Syntax

js
resolvedOptions()

Parameters

None.

Return value

A new object with properties reflecting the options computed during the initialization of this ListFormat object. The object has the following properties, in the order they are listed:

locale

The BCP 47 language tag for the locale actually used, determined by the locale negotiation process. No Unicode extension key will be included in the output.

type

The value provided for this property in the options argument, with default filled in as needed. It is either "conjunction", "disjunction", or "unit". The default is "conjunction".

style

The value provided for this property in the options argument, with default filled in as needed. It is either "long", "short", or "narrow". The default is "long".

Examples

Using resolvedOptions

js
const deListFormatter = new Intl.ListFormat("de-DE", { style: "short" });

const usedOptions = de.resolvedOptions();
console.log(usedOptions.locale); // "de-DE"
console.log(usedOptions.style); // "short"
console.log(usedOptions.type); // "conjunction" (the default value)

Specifications

Specification
ECMAScript® 2025 Internationalization API Specification
# sec-Intl.ListFormat.prototype.resolvedoptions

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
resolvedOptions

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
See implementation notes.

See also