[Bug 27122] MutationObserver.observe(node, {}) should throw

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

--- Comment #14 from Olli Pettay <bugs@pettay.fi> ---
We're not adding any shadow DOM specific options atm. That is hypothetical
still
(observing changes in Shadow DOM would make its encapsulation weaker and
weaker, though since it pretty much doesn't any any encapsulation, perhaps that
doesn't really matter.)

If one is using options which don't cause any observing would be a 
bug in application logic, and in such case there should be an exception thrown
as early as possible.

(In reply to Jonas Sicking from comment #13)
> (In reply to Olli Pettay from comment #11)

> The other reason is that we can't really be consistent. I.e. we can't make
> both of these throw, so it might be more consistent to make neither throw:
> 
> MutationObserver.observe(node, { newFeature: true })
> MutationObserver.observe(node, { newFeature: true, childList: true })
I'm not saying they both should throw. The latter is perfectly valid.

This is no different to
XHR.open("foobar", "http://www.w3.org");
Maybe in the future we'll support "foobar" method, but for now open() throws if
invalid method name is passed to it as the first parameter.

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

Received on Wednesday, 22 October 2014 11:20:33 UTC