Skip to content

Why is the second parameter to MutationObserver.observe() optional? #332

Closed
@cdumez

Description

@cdumez

The second parameter to MutationObserver.observe() is optional in the specification. I don't understand why we don't simply mark it as mandatory considering that it will throw a TypeError if omitted anyway.

Behavior of browser engines:

  • Gecko agrees with the spec (Argument is optional but throws a TypeError when omitted)
  • WebKit / Blink mark the second parameter as mandatory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions