vent;
    mql.addEventListener("custom", event => {
        receivedEvent = event;
        event.preventDefault();
    }, true);

    const dispatchedEvent = new CustomEvent("custom", {
        cancelable: true,
        detail: {},
    });

    const defaultAction = mql.dispatchEvent(dispatchedEvent);

    assert_equals(receivedEvent, dispatchedEvent);
    assert_false(defaultAction);
}, "dispatchEvent works as expected");
</script>
