requestAnimationFrame triggers edge specific bug when returning an object without a prototype
Fixed, not yet flighted Issue #8187485
Steps to reproduce
- Try this:
requestAnimationFrame( function(ts){ return {} } );
// no error
- Then try this:
requestAnimationFrame( function(ts){ return Object.create( null ) } ); // error when animation frame renders
Which will give the very “usefull” output of:
SCRIPT5001: Number expected
It only happens in Edge.
Every spec, including MDN documentation says you shouldn’t do anything with the return value of a callback in requestAnimation in the first place. But its scary to think that are subsystems that are unable to deal with Object.create( null ).
PS. As a general rule, please consider any error without a proper line-number a serious offense. Supporting Edge is not a requirement for us right now, but we felt like being inclusive – but getting an error without a functioning line-number, that you can’t find using step-debugging, is an impossible to support situation in general. If you want developers to embrace Edge, please search for all places in your code base where these kind of error messages are outputted, and mark a big fat ‘TODO’ above it, to at least internally acknowledge that situation is far from optimal and some developer is taking the (way too easy) way out.
You need to sign in to your Microsoft account to add a comment.
Sign in