Add cancelAnimationFrame as it is the primary way to cancel Fixed #796

window.cancelAnimationFrame was missing and it causes an warning in Chrome.