requestAnimationFrame() and cancelAnimationFrame() have been unprefixed

Published: | Categories: DOM

Description

requestAnimationFrame, the unprefixed version of mozRequestAnimationFrame, has been added. This unprefixed method passes a DOMHighResTimeStamp to callbacks. It has microsecond precision and can be compared to performance.now.

On the other hand, the prefixed method, which will be removed in the future, continues to pass an epoch-based DOMTimeStamp to callbacks. The passed-in value has millisecond precision and can be compared to mozAnimationStartTime.

The unprefixed cancelAnimationFrame method has also been added. It has the same behaviour as the prefixed mozCancelAnimationFrame method. Those moz-prefixed methods will be removed in the future.

Update: Those prefixed methods have been removed with Firefox 42.

References