This tests the constructor for the FocusEvent DOM class. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". PASS new FocusEvent('eventType').bubbles is false PASS new FocusEvent('eventType').cancelable is false PASS new FocusEvent('eventType').view is null PASS new FocusEvent('eventType').detail is 0 PASS new FocusEvent('eventType').relatedTarget is null PASS new FocusEvent('eventType', { bubbles: false }).bubbles is false PASS new FocusEvent('eventType', { bubbles: true }).bubbles is true PASS new FocusEvent('eventType', { cancelable: false }).cancelable is false PASS new FocusEvent('eventType', { cancelable: true }).cancelable is true PASS new FocusEvent('eventType', { view: window }).view is window PASS new FocusEvent('eventType', { view: this }).view is this PASS new FocusEvent('eventType', { view: testObject }).view threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'view' property from 'UIEventInit': Failed to convert value to 'Window'.. PASS new FocusEvent('eventType', { view: document }).view threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'view' property from 'UIEventInit': Failed to convert value to 'Window'.. PASS new FocusEvent('eventType', { view: undefined }).view is null PASS new FocusEvent('eventType', { view: null }).view is null PASS new FocusEvent('eventType', { view: false }).view threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'view' property from 'UIEventInit': Failed to convert value to 'Window'.. PASS new FocusEvent('eventType', { view: true }).view threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'view' property from 'UIEventInit': Failed to convert value to 'Window'.. PASS new FocusEvent('eventType', { view: '' }).view threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'view' property from 'UIEventInit': Failed to convert value to 'Window'.. PASS new FocusEvent('eventType', { view: 'chocolate' }).view threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'view' property from 'UIEventInit': Failed to convert value to 'Window'.. PASS new FocusEvent('eventType', { view: 12345 }).view threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'view' property from 'UIEventInit': Failed to convert value to 'Window'.. PASS new FocusEvent('eventType', { view: 18446744073709551615 }).view threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'view' property from 'UIEventInit': Failed to convert value to 'Window'.. PASS new FocusEvent('eventType', { view: NaN }).view threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'view' property from 'UIEventInit': Failed to convert value to 'Window'.. PASS new FocusEvent('eventType', { view: {valueOf: function () { return window; } } }).view == window threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'view' property from 'UIEventInit': Failed to convert value to 'Window'.. PASS new FocusEvent('eventType', { get view() { return window; } }).view is window PASS new FocusEvent('eventType', { get view() { return 123; } }).view threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'view' property from 'UIEventInit': Failed to convert value to 'Window'.. PASS new FocusEvent('eventType', { get view() { throw 'FocusEvent Error'; } }) threw exception FocusEvent Error. PASS new FocusEvent('eventType', { relatedTarget: testDiv }).relatedTarget is testDiv PASS new FocusEvent('eventType', { relatedTarget: document }).relatedTarget is document PASS new FocusEvent('eventType', { relatedTarget: xhr }).relatedTarget is xhr PASS new FocusEvent('eventType', { relatedTarget: window }).relatedTarget is window PASS new FocusEvent('eventType', { relatedTarget: testObject }).relatedTarget threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'relatedTarget' property from 'FocusEventInit': Failed to convert value to 'EventTarget'.. PASS new FocusEvent('eventType', { relatedTarget: undefined }).relatedTarget is null PASS new FocusEvent('eventType', { relatedTarget: null }).relatedTarget is null PASS new FocusEvent('eventType', { relatedTarget: false }).relatedTarget threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'relatedTarget' property from 'FocusEventInit': Failed to convert value to 'EventTarget'.. PASS new FocusEvent('eventType', { relatedTarget: true }).relatedTarget threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'relatedTarget' property from 'FocusEventInit': Failed to convert value to 'EventTarget'.. PASS new FocusEvent('eventType', { relatedTarget: '' }).relatedTarget threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'relatedTarget' property from 'FocusEventInit': Failed to convert value to 'EventTarget'.. PASS new FocusEvent('eventType', { relatedTarget: 'chocolate' }).relatedTarget threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'relatedTarget' property from 'FocusEventInit': Failed to convert value to 'EventTarget'.. PASS new FocusEvent('eventType', { relatedTarget: 12345 }).relatedTarget threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'relatedTarget' property from 'FocusEventInit': Failed to convert value to 'EventTarget'.. PASS new FocusEvent('eventType', { relatedTarget: 18446744073709551615 }).relatedTarget threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'relatedTarget' property from 'FocusEventInit': Failed to convert value to 'EventTarget'.. PASS new FocusEvent('eventType', { relatedTarget: NaN }).relatedTarget threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'relatedTarget' property from 'FocusEventInit': Failed to convert value to 'EventTarget'.. PASS new FocusEvent('eventType', { relatedTarget: {valueOf: function () { return testDiv; } } }).relatedTarget == testDiv threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'relatedTarget' property from 'FocusEventInit': Failed to convert value to 'EventTarget'.. PASS new FocusEvent('eventType', { get relatedTarget() { return testDiv; } }).relatedTarget == testDiv is true PASS new FocusEvent('eventType', { get relatedTarget() { return 123; } }).relatedTarget threw exception TypeError: Failed to construct 'FocusEvent': Failed to read the 'relatedTarget' property from 'FocusEventInit': Failed to convert value to 'EventTarget'.. PASS new FocusEvent('eventType', { get relatedTarget() { throw 'FocusEvent Error'; } }) threw exception FocusEvent Error. PASS new FocusEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, relatedTarget: testDiv }).bubbles is true PASS new FocusEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, relatedTarget: testDiv }).cancelable is true PASS new FocusEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, relatedTarget: testDiv }).view is window PASS new FocusEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, relatedTarget: testDiv }).detail is 111 PASS new FocusEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, relatedTarget: testDiv }).relatedTarget is testDiv PASS successfullyParsed is true TEST COMPLETE