I'm aware that you can set an onclick handler like this:
my_a = document.createElement('a');
my_a.onclick = somefunction;
... but what if somefunction takes a parameter? For the sake of simplicity, let's say I need to pass it the string "x". Is is possible to dynamically set the onclick handler to somefunction('x')?