We recently introduced the nonce content security policy in our software. The problem is that we have hundreds of HTML elements which execute inline Javascript with onclick events and we don't want to accept 'unsafe-inline' anymore.
Is there any way of getting all the elements from a page with onclick attribute set, read the code that they execute it and add something like
$(element).click(function(){
doAction();
});