Comment

Comment by smysore

why hasn't anyone suggested this: els[i].addEventListener('click', new Function("","alert("+i+");"),false);

it works fine and it's much shorter and easier to read than nested function declarations

parent smysore 16 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton