[Bug 23189] Better defaults for #observe options

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23189

--- Comment #3 from Anne <annevk@annevk.nl> ---
So a new model would look like:

dictionary MutationObserverInit {
  boolean childList = false;
  boolean attributes;
  boolean characterData;
  boolean subtree = false;
  boolean attributeOldValue = false;
  boolean characterDataOldValue = false;
  sequence<DOMString> attributeFilter;
};

* If options' attributeOldValue is true and options' attributes is omitted, set
options' attributes to true.

* If options' attributeFilter is present and options' attributes is omitted,
set
options' attributes to true.

* If options' characterDataOldValue is true and options' characterData is
omitted, set options' characterData to true.

* If none of options' childList, attributes, and characterData is true, throw a
TypeError.

* If attributeOldValue is true and attributes is false, throw a TypeError.

* If attributeFilter is a non-empty array and attributes is false, throw a
TypeError.

* If characterDataOldValue is true and characterData is false, throw a
TypeError.

(I also changed the exception to a JavaScript TypeError in our quest to more
closely integrate with JavaScript.)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 10 September 2013 11:04:38 UTC