vendredi 29 mai 2015

Try { ... } catch { ... } on addEventListener

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