- Notifications
You must be signed in to change notification settings - Fork29
Throw TypeErrors on invalid inputs to AnimationEffectTiming#426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
src/timing-utilities.js Outdated
| returnthis._fill; | ||
| }, | ||
| setiterationStart(value){ | ||
| if(value<0){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Should this have an isNan check as well, like duration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Added check, I realise now the NaN check is implicit in the IDL type.
test/js/timing-utilities.js Outdated
| for(vari=0;i<=1;i+=0.1){ | ||
| assert.equal(f(i),i,easing+' is linear'); | ||
| } | ||
| functionassertThrows(easing){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
To make this test easier to read, I think this function name should be more explicit about what it does. This is a bit long but maybe something like assertThrowsOnConversionToTimingFunction? assertInvalidEasingThrows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Done.
suzyh commentedApr 20, 2016
lgtm |
This change adds TypeErrors to setters on AnimationEffectTiming for
iterationStart,iterations,durationandeasing.Relevant spec:http://w3c.github.io/web-animations/#animationeffecttiming