Mutation Observer API

This commit is contained in:
Sumit 2017-05-14 01:44:14 -04:00 committed by Josh Matthews
parent fa251ec96b
commit 3ca89204ff
15 changed files with 432 additions and 180 deletions

View file

@ -9,7 +9,8 @@
// https://dom.spec.whatwg.org/#mutationobserver
[Pref="dom.mutation_observer.enabled", Constructor(MutationCallback callback)]
interface MutationObserver {
//void observe(Node target, optional MutationObserverInit options);
[Throws]
void observe(Node target, optional MutationObserverInit options);
//void disconnect();
//sequence<MutationRecord> takeRecords();
};

View file

@ -12,13 +12,13 @@ interface MutationRecord {
readonly attribute DOMString type;
[SameObject]
readonly attribute Node target;
//[SameObject]
//readonly attribute NodeList addedNodes;
//[SameObject]
//readonly attribute NodeList removedNodes;
//readonly attribute Node? previousSibling;
//readonly attribute Node? nextSibling;
//readonly attribute DOMString? attributeName;
//readonly attribute DOMString? attributeNamespace;
//readonly attribute DOMString? oldValue;
[SameObject]
readonly attribute NodeList addedNodes;
[SameObject]
readonly attribute NodeList removedNodes;
readonly attribute Node? previousSibling;
readonly attribute Node? nextSibling;
readonly attribute DOMString? attributeName;
readonly attribute DOMString? attributeNamespace;
readonly attribute DOMString? oldValue;
};