TypeScript-DOM-lib-generator icon indicating copy to clipboard operation
TypeScript-DOM-lib-generator copied to clipboard

MutationObserver.observe() should not have optional second argument

Open diesal11 opened this issue 4 years ago • 0 comments

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.

diesal11 avatar Feb 24 '21 23:02 diesal11