michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: * michael@0: * The origin of this IDL file is michael@0: * http://dom.spec.whatwg.org michael@0: */ michael@0: michael@0: interface MutationRecord { michael@0: [Constant] michael@0: readonly attribute DOMString type; michael@0: // .target is not nullable per the spec, but in order to prevent crashes, michael@0: // if there are GC/CC bugs in Gecko, we let the property to be null. michael@0: [Constant] michael@0: readonly attribute Node? target; michael@0: [Constant] michael@0: readonly attribute NodeList addedNodes; michael@0: [Constant] michael@0: readonly attribute NodeList removedNodes; michael@0: [Constant] michael@0: readonly attribute Node? previousSibling; michael@0: [Constant] michael@0: readonly attribute Node? nextSibling; michael@0: [Constant] michael@0: readonly attribute DOMString? attributeName; michael@0: [Constant] michael@0: readonly attribute DOMString? attributeNamespace; michael@0: [Constant] michael@0: readonly attribute DOMString? oldValue; michael@0: }; michael@0: michael@0: [Constructor(MutationCallback mutationCallback)] michael@0: interface MutationObserver { michael@0: [Throws] michael@0: void observe(Node target, optional MutationObserverInit options); michael@0: void disconnect(); michael@0: sequence takeRecords(); michael@0: michael@0: [ChromeOnly] michael@0: sequence getObservingInfo(); michael@0: [ChromeOnly] michael@0: readonly attribute MutationCallback mutationCallback; michael@0: }; michael@0: michael@0: callback MutationCallback = void (sequence mutations, MutationObserver observer); michael@0: michael@0: dictionary MutationObserverInit { michael@0: boolean childList = false; michael@0: boolean attributes = false; michael@0: boolean characterData = false; michael@0: boolean subtree = false; michael@0: boolean attributeOldValue = false; michael@0: boolean characterDataOldValue = false; michael@0: sequence attributeFilter; michael@0: }; michael@0: michael@0: dictionary MutationObservingInfo : MutationObserverInit michael@0: { michael@0: Node? observedNode = null; michael@0: };