Sunday, April 6, 2014

Simulating mouse button hold

... is the easiest using a simple recursive function which continuously does clicking, thought Mr. Legacy Coder, and found out, that the best jQuery implementation for this would be onclick="$(this).click();". Too bad, that this throws a Maximum call stack size exceeded error. Yea, there's always hope, that such script execution ends in a finite time. The key element of legacy code is always Magic. But this came to his mind, too - turns out from the following few lines: preventDefault() called after 3000 milliseconds timeout. #genius

No comments:

Post a Comment