Rewrite event handling
Working HTML5 engine without jQuery