) { calls++; };
    eventListener.handleEvent = t.unreached_func("`handleEvent` method should not be called on functions");

    target.addEventListener(type, eventListener);
    target.dispatchEvent(new Event(type));
    assert_equals(calls, 1);
}, "doesn't call `handleEvent` method on callable `EventListener`");

const uncaught_error_test = async (t, getHandleEvent) => {
    const type = "foo";
    const target = document.createElement("div");

    let calls = 0;
    target.addEventListener(type, {
      