diff options
author | Sumit <srivassumit@gmail.com> | 2017-03-16 15:46:45 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2017-04-05 01:52:38 -0400 |
commit | 107ac9ab56c1a4cee3e5f9828f91ab394e3e8eee (patch) | |
tree | d65a403aaf42a086904eb86a9e9c22b2a6a5cdf5 /components/script/dom/webidls/MutationObserver.webidl | |
parent | 5421d833de30e0c963bc6241120263897d4fc68c (diff) | |
download | servo-107ac9ab56c1a4cee3e5f9828f91ab394e3e8eee.tar.gz servo-107ac9ab56c1a4cee3e5f9828f91ab394e3e8eee.zip |
Implement basic interface for MutationObserver and MutationRecord.
Diffstat (limited to 'components/script/dom/webidls/MutationObserver.webidl')
-rw-r--r-- | components/script/dom/webidls/MutationObserver.webidl | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/components/script/dom/webidls/MutationObserver.webidl b/components/script/dom/webidls/MutationObserver.webidl new file mode 100644 index 00000000000..dbcfa945d4a --- /dev/null +++ b/components/script/dom/webidls/MutationObserver.webidl @@ -0,0 +1,27 @@ +/* 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/. */ +/* + * The origin of this IDL file is: + * https://dom.spec.whatwg.org/#mutationobserver + */ + +// https://dom.spec.whatwg.org/#mutationobserver +[Pref="dom.mutation_observer.enabled", Constructor(MutationCallback callback)] +interface MutationObserver { + //void observe(Node target, optional MutationObserverInit options); + //void disconnect(); + //sequence<MutationRecord> takeRecords(); +}; + +callback MutationCallback = void (sequence<MutationRecord> mutations, MutationObserver observer); + +dictionary MutationObserverInit { + boolean childList = false; + boolean attributes; + boolean characterData; + boolean subtree = false; + boolean attributeOldValue; + boolean characterDataOldValue; + sequence<DOMString> attributeFilter; +}; |