This tests the constructor for the CustomEvent DOM class.

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


PASS new CustomEvent('eventType').bubbles is false
PASS new CustomEvent('eventType').cancelable is false
FAIL new CustomEvent('eventType').detail should be null (of type object). Was undefined (of type undefined).
PASS new CustomEvent('eventType', { bubbles: true, cancelable: true }).bubbles is true
PASS new CustomEvent('eventType', { bubbles: true, cancelable: true }).cancelable is true
FAIL new CustomEvent('eventType', { bubbles: true, cancelable: true }).detail should be null (of type object). Was undefined (of type undefined).
PASS new CustomEvent('eventType', { detail: 10 }).detail is 10
PASS new CustomEvent('eventType', { detail: 'string' }).detail is 'string'
PASS new CustomEvent('eventType', { detail: detailObject }).detail is detailObject
PASS new CustomEvent('eventType', { detail: document }).detail is document
PASS new CustomEvent('eventType', { get detail() { return true; } }).detail is true
PASS new CustomEvent('eventType', { get detail() { throw 'Custom Error'; } }) threw exception Custom Error.
PASS successfullyParsed is true

TEST COMPLETE

