requestAnimationFrame callback not called in extension background page
Reported by
greine...@gmail.com,
Sep 8 2017
|
|||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Steps to reproduce the problem:
1. Open JavaScript console for an extension's background page.
2. Execute `requestAnimationFrame(() => console.log("foo"))`.
What is the expected behavior?
Console output shows string "foo".
What went wrong?
Console output doesn't show string "foo".
Did this work before? N/A
Does this work in other browsers? Yes
Chrome version: 59.0.3071.115 Channel: stable
OS Version: 16.04
Flash Version: 26.0.0.151
It works as expected in Firefox 56.0b10
,
Sep 11 2017
Able to reproduce the issue on Ubuntu 14.04, Windows 10 and Mac 10.1.6 with the reported version 59.0.3071.115 Stable, latest Stable 61.0.3163.79 and latest canary 63.0.3212.0. Issue is reproducible on M-50 [50.0.2661.0] and is Non-Regression issue. Hence, marking it as Untriaged.
,
Sep 11 2017
Extension background pages aren't visible so we don't run any animations in them. This behavior matches that of background tabs.
,
Sep 11 2017
While the background page itself is indeed not visible, it can generate image data to update the browser action icon (see https://developer.chrome.com/extensions/browserAction#icon). Therefore having `requestAnimationFrame()` could be useful to implement smooth animations of the browser action icon. I apologize for not mentioning this in the issue description. |
|||
►
Sign in to add a comment |
|||
Comment 1 by ligim...@chromium.org
, Sep 8 2017