Skip to content

RequestAnimationFrame breaks PWA #24468

@Laurensvdmaas

Description

@Laurensvdmaas

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:

Current behavior

When running an app with requestAnimationFrame, service worker won't be loaded.

Expected behavior

Service worker to load.

Minimal reproduction of the problem with instructions

  1. Checkout https://github.com/Laurensvdmaas/pwa-bug.git (branch: bug)
  2. npm install
  3. npm run build:ssr && npm run serve:ssr

In app.component.ts is a function frame if you turn this off and rerun the steps above you can see the service worker will load correctly.

What is the motivation / use case for changing the behavior?

Running animations with requestAnimationFrame is crucial.

Environment


Angular version: 6.0

Browser:
- [x] Chrome (desktop) version 67

 
For Tooling issues:
- Node version: 8.11.2
- Platform:  Mac

Others:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions