Category: JavaScript

0

Uncaught SyntaxError: Unexpected token u

Do you see the following error in your console and wonder what’s wrong? Uncaught SyntaxError: Unexpected token Most likely, this error occurs when the input given to the JSON.parse() can not be converted to...

How to get the list of event listeners for a dom element in javascript 0

How to get the list of event listeners for a dom element in javascript

Sometimes when debugging its useful to be able to query the list of event listeners on the DOM element. You can easily do that by typing the following command in the console getEventListeners(domElement); NOTE:...