How can I add an try catch in a addEventListener? Is there any way?
document.addEventListener("DOMContentLoaded", function (event) {
X();
});
document.attachEvent("onreadystatechange", function () {
if (document.readyState === "complete") {
X();
}
});
Aucun commentaire:
Enregistrer un commentaire