lundi 28 janvier 2019

Why does .on() not see to call its function when the subtree is modified?

Im working on an in-browser (very basic) chat. I have jquery code

    $("#msgs").on("DOMSubtreeModified", function() {
        location.reload()
    });

and i need to refresh the page when the div msgs has another

added to it.

Why is this code not doing so?

I've tried MutationObserver as well

the repl for those that want to test it: https://repl.it/@aceharvey/hy-chat




Aucun commentaire:

Enregistrer un commentaire