TypeScript-DOM-lib-generator
TypeScript-DOM-lib-generator copied to clipboard
MutationObserver.observe() should not have optional second argument
According to MutationObserver MDN docs, calling .observe() without an options argument will throw a type error.
The docs for the options type MutationObserverInit state that:
At a minimum, one of childList, attributes, and/or characterData must be true when you call observe(). Otherwise, a TypeError exception will be thrown.
However, all of childList, attributes & characterData are false by default, including when an options argument is not provided. Therefore i believe that the secondary argument for observe() being optional is incorrect.