Add [TypeChecking=Interface] to Node interface

This changes the behavior of the methods

  compareDocumentPosition(Node)
  contains(Node?)
  isEqualNode(Node?)
  isSameNode(Node?)

that now throw TypeError exceptions instead of returning false when called
with invalid arguments. The argument to isSameNode() is also made
required instead of optional, meaning it will also throw TypeError when
called without arguments.

The new behavior matches Firefox, except in the case of isSameNode() which
Firefox doesn't support. (The method has been removed from the spec.)

The new behavior of compareDocumentPosition() and isEqualNode() also matches
IE11.

BUG=462561

Review URL: https://codereview.chromium.org/978223002

git-svn-id: svn://svn.chromium.org/blink/trunk@191440 bbb929c8-8fbe-4397-9dbb-9b2b20218538
6 files changed
tree: c10dbb8d2e56b70ca034721879187aaf7fcf6a1b
  1. third_party/