Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / dom / chrome-webidl / MozSharedMap.webidl
blobef262fc48e5cff4256797db8646c0a4e7e5a521b
1 /* -*- Mode: IDL; 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/.
5  */
7 typedef any StructuredClonable;
9 [ChromeOnly, Exposed=Window]
10 interface MozSharedMapChangeEvent : Event {
11   [Cached, Constant]
12   readonly attribute sequence<DOMString> changedKeys;
15 dictionary MozSharedMapChangeEventInit : EventInit {
16   required sequence<DOMString> changedKeys;
19 [ChromeOnly, Exposed=Window]
20 interface MozSharedMap : EventTarget {
21   boolean has(DOMString name);
23   [Throws]
24   StructuredClonable get(DOMString name);
26   iterable<DOMString, StructuredClonable>;
29 [ChromeOnly, Exposed=Window]
30 interface MozWritableSharedMap : MozSharedMap {
31   /**
32    * Sets the given key to the given structured-clonable value. The value is
33    * synchronously structured cloned, and the serialized value is saved in the
34    * map.
35    *
36    * Unless flush() is called, the new value will be broadcast to content
37    * processes after a short delay.
38    */
39   [Throws]
40   undefined set(DOMString name, StructuredClonable value);
42   /**
43    * Removes the given key from the map.
44    *
45    * Unless flush() is called, the removal will be broadcast to content
46    * processes after a short delay.
47    */
48   undefined delete(DOMString name);
50   /**
51    * Broadcasts any pending changes to all content processes.
52    */
53   undefined flush();