Bug 1852740: add tests for the `fetchpriority` attribute in Link headers. r=necko...
[gecko.git] / dom / chrome-webidl / Fluent.webidl
blob214387217f22468692f703f3f7e78e1879f8ae19
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 dictionary FluentTextElementItem {
7   UTF8String id;
8   UTF8String attr;
9   UTF8String text;
12 [ChromeOnly, Exposed=Window]
13 interface FluentResource {
14   constructor(UTF8String source);
16   [Throws]
17   sequence<FluentTextElementItem> textElements();
20 [ChromeOnly, Exposed=Window]
21 interface FluentPattern {};
23 /**
24  * FluentMessage is a structure storing an unresolved L10nMessage,
25  * as returned by the Fluent Bundle.
26  *
27  * It stores a FluentPattern of the value and attributes, which
28  * can be then passed to bundle.formatPattern.
29  */
31 dictionary FluentMessage {
32   FluentPattern? value = null;
33   required record<UTF8String, FluentPattern> attributes;
36 typedef record<UTF8String, (UTF8String or double)?> L10nArgs;
38 dictionary FluentBundleOptions {
39   boolean useIsolating = false;
40   UTF8String pseudoStrategy;
43 dictionary FluentBundleAddResourceOptions {
44   boolean allowOverrides = false;
47 [ChromeOnly, Exposed=Window]
48 interface FluentBundle {
49   [Throws]
50   constructor((UTF8String or sequence<UTF8String>) aLocales, optional FluentBundleOptions aOptions = {});
52   [Pure, Cached]
53   readonly attribute sequence<UTF8String> locales;
55   undefined addResource(FluentResource aResource, optional FluentBundleAddResourceOptions aOptions = {});
56   boolean hasMessage(UTF8String id);
57   FluentMessage? getMessage(UTF8String id);
58   [Throws]
59   UTF8String formatPattern(FluentPattern pattern, optional L10nArgs? aArgs = null, optional object aErrors);