如果“ myEvent”接收器在执行期间发生异常,则事件发射器停止执行。事件发射器依赖于接收器是正常的吗?
$(window).on("myEvent", () => {
throw "Boo"
});
$(window).trigger("myEvent");
console.log("never comes here");
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>