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/.
7 typedef any StructuredClonable;
9 [ChromeOnly, Exposed=Window]
10 interface MozSharedMapChangeEvent : Event {
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);
24 StructuredClonable get(DOMString name);
26 iterable<DOMString, StructuredClonable>;
29 [ChromeOnly, Exposed=Window]
30 interface MozWritableSharedMap : MozSharedMap {
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
36 * Unless flush() is called, the new value will be broadcast to content
37 * processes after a short delay.
40 void set(DOMString name, StructuredClonable value);
43 * Removes the given key from the map.
45 * Unless flush() is called, the removal will be broadcast to content
46 * processes after a short delay.
48 void delete(DOMString name);
51 * Broadcasts any pending changes to all content processes.