* Runs the animation vsync task. This operation can only run when animations * are allowed. Otherwise, this method returns `false` and exits. * @param {!Node} contextNode * @param {!VsyncTaskSpecDef} task * @param {!VsyncStateDef=} opt_state * @return {boolean}
(contextNode, task, opt_state)
| 298 | * @return {boolean} |
| 299 | */ |
| 300 | runAnim(contextNode, task, opt_state) { |
| 301 | // Do not request animation frames when the document is not visible. |
| 302 | if (!this.canAnimate_(contextNode)) { |
| 303 | dev().warn( |
| 304 | 'VSYNC', |
| 305 | 'Did not schedule a vsync request, because document was invisible' |
| 306 | ); |
| 307 | return false; |
| 308 | } |
| 309 | this.run(task, opt_state); |
| 310 | return true; |
| 311 | } |
| 312 | |
| 313 | /** |
| 314 | * Creates an animation vsync task. This operation can only run when |
no test coverage detected