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 file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
6 * The origin of this IDL file is
7 * http://dom.spec.whatwg.org
10 [ProbablyShortLivingWrapper,
12 interface MutationRecord {
14 readonly attribute DOMString type;
15 // .target is not nullable per the spec, but in order to prevent crashes,
16 // if there are GC/CC bugs in Gecko, we let the property to be null.
18 readonly attribute Node? target;
20 readonly attribute NodeList addedNodes;
22 readonly attribute NodeList removedNodes;
24 readonly attribute Node? previousSibling;
26 readonly attribute Node? nextSibling;
28 readonly attribute DOMString? attributeName;
30 readonly attribute DOMString? attributeNamespace;
32 readonly attribute DOMString? oldValue;
33 [Constant, Cached, ChromeOnly]
34 readonly attribute sequence<Animation> addedAnimations;
35 [Constant, Cached, ChromeOnly]
36 readonly attribute sequence<Animation> changedAnimations;
37 [Constant, Cached, ChromeOnly]
38 readonly attribute sequence<Animation> removedAnimations;
42 interface MutationObserver {
44 constructor(MutationCallback mutationCallback);
46 [Throws, NeedsSubjectPrincipal]
47 undefined observe(Node target, optional MutationObserverInit options = {});
48 undefined disconnect();
49 sequence<MutationRecord> takeRecords();
52 sequence<MutationObservingInfo?> getObservingInfo();
54 readonly attribute MutationCallback mutationCallback;
56 attribute boolean mergeAttributeRecords;
59 callback MutationCallback = undefined (sequence<MutationRecord> mutations, MutationObserver observer);
61 dictionary MutationObserverInit {
62 boolean childList = false;
64 boolean characterData;
65 boolean subtree = false;
66 boolean attributeOldValue;
67 boolean characterDataOldValue;
69 boolean chromeOnlyNodes = false;
71 boolean animations = false;
72 sequence<DOMString> attributeFilter;
75 dictionary MutationObservingInfo : MutationObserverInit
77 Node? observedNode = null;