Test Element.closest() with no argument, null, and undefined.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS document.getElementById("target1").closest() threw exception TypeError: Not enough arguments.
PASS document.getElementById("target1").closest(null).id is "null1"
PASS document.getElementById("target1").closest(undefined).id is "undefined1"
PASS document.getElementById("target2").closest() threw exception TypeError: Not enough arguments.
PASS document.getElementById("target2").closest(null).id is "null2"
PASS document.getElementById("target2").closest(undefined) is null
PASS document.getElementById("target3").closest() threw exception TypeError: Not enough arguments.
PASS document.getElementById("target3").closest(null) is null
PASS document.getElementById("target3").closest(undefined).id is "undefined3"
PASS document.getElementById("target4").closest() threw exception TypeError: Not enough arguments.
PASS document.getElementById("target4").closest(null) is null
PASS document.getElementById("target4").closest(undefined) is null
PASS successfullyParsed is true

TEST COMPLETE

