2018-06-22 20:14:23 +00:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
webidl Document;
|
|
|
|
webidl Element;
|
2018-09-07 01:20:18 +00:00
|
|
|
webidl Node;
|
2018-06-22 20:14:23 +00:00
|
|
|
|
|
|
|
[scriptable, uuid(7c468500-541f-4fe0-98c9-92a53b63ec8d)]
|
|
|
|
interface mozIDOMLocalization : nsISupports
|
|
|
|
{
|
2018-09-07 01:19:26 +00:00
|
|
|
unsigned long addResourceIds(in Array<AString> resourceIds, in bool aEager);
|
2018-06-22 20:14:23 +00:00
|
|
|
unsigned long removeResourceIds(in Array<AString> resourceIds);
|
2019-03-05 02:16:14 +00:00
|
|
|
void onChange();
|
2018-06-22 20:14:23 +00:00
|
|
|
|
|
|
|
Promise formatMessages(in Array<jsval> aKeys);
|
|
|
|
Promise formatValues(in Array<jsval> aKeys);
|
2018-09-06 08:02:43 +00:00
|
|
|
Promise formatValue(in AString aId, [optional] in jsval aArgs);
|
2018-06-22 20:14:23 +00:00
|
|
|
|
|
|
|
Promise translateElements(in Array<Element> aElements);
|
|
|
|
|
|
|
|
void connectRoot(in Element aElement);
|
2019-02-07 14:37:26 +00:00
|
|
|
void disconnectRoot(in Element aElement);
|
2019-03-13 00:24:41 +00:00
|
|
|
|
|
|
|
void pauseObserving();
|
|
|
|
void resumeObserving();
|
|
|
|
|
2018-06-22 20:14:23 +00:00
|
|
|
Promise translateRoots();
|
|
|
|
readonly attribute Promise ready;
|
|
|
|
};
|
2019-02-07 01:52:45 +00:00
|
|
|
|
2019-04-21 01:47:00 +00:00
|
|
|
[scriptable, uuid(96532d26-2422-11e9-a1ce-9bb586acd241)]
|
2019-02-07 01:52:45 +00:00
|
|
|
interface mozIDOMLocalizationJSM : nsISupports
|
|
|
|
{
|
|
|
|
mozIDOMLocalization getDOMLocalization();
|
|
|
|
};
|