Improved responsiveness of canvas element