mardi 4 août 2015

Read value of previously assigned function to onclick event by javascript

I have this code:

document.getElementById(myid).onclick = function() {
    HandleGPIO(val1, val2);
};

if (console) {
    console.log(document.getElementById(myid).getAttribute('onclick'));
}

And I would like to see how function HandleGPIO() was assigned.

how to debug it? getAttribute does not work here and returns null only



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire