Currently setInterval with a value less than 1 is clamped to 1. This intent removes that restriction. Before: setInterval(..., 0) -> 1ms delay. After: setInterval(..., 0) -> 0ms delay. Notes: * This has no effect on the 4ms clamping for nested calls to timeouts. * setTimeout clamping was removed in a previous intent.
Firefox already does not clamp setInterval to 1ms. Chromium-based browsers have not clamped setTimeout since 2022: https://groups.google.com/a/chromium.org/g/blink-dev/c/HKPTp7C1LwY/m/I0pm-cqFAQAJ Webkit removed clamping of setTimeout: https://bugs.webkit.org/show_bug.cgi?id=221124 Webkit still has clamping for setInterval: https://github.com/WebKit/WebKit/blob/main/Source/WebCore/page/DOMTimer.cpp#L54 Bug requesting removal of that: https://bugs.webkit.org/show_bug.cgi?id=286774
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
No special risks for WebView.
None
Does the feature depend on any code or APIs outside the Chromium open source repository and its open-source dependencies to function?
NoShipping on desktop | 135 |
Shipping on Android | 135 |
Shipping on WebView | 135 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
None--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/679c0447.2b0a0220.243291.046c.GAE%40google.com.
(fixed intent title)On Thu, Jan 30, 2025 at 2:59 PM Chromestatus <ad...@cr-status.appspotmail.com> wrote:Contact emails
chri...@chromium.orgExplainer
NoneSpecification
NoneSummary
Currently setInterval with a value less than 1 is clamped to 1. This intent removes that restriction. Before: setInterval(..., 0) -> 1ms delay. After: setInterval(..., 0) -> 0ms delay. Notes: * This has no effect on the 4ms clamping for nested calls to timeouts. * setTimeout clamping was removed in a previous intent.
On Thu, Jan 30, 2025 at 6:00 PM Chris Harrelson <chri...@chromium.org> wrote:(fixed intent title)On Thu, Jan 30, 2025 at 2:59 PM Chromestatus <ad...@cr-status.appspotmail.com> wrote:Contact emails
chri...@chromium.orgExplainer
NoneSpecification
NoneSummary
Currently setInterval with a value less than 1 is clamped to 1. This intent removes that restriction. Before: setInterval(..., 0) -> 1ms delay. After: setInterval(..., 0) -> 0ms delay. Notes: * This has no effect on the 4ms clamping for nested calls to timeouts. * setTimeout clamping was removed in a previous intent.
What are the semantics of setInterval(..., 0)? Is it "run on every frame", like repeated rAF()? Does it also run immediately in the current frame? Something else?
Is there any spec that answers questions about the setInterval(0) behavior?
(fixed intent title)On Thu, Jan 30, 2025 at 2:59 PM Chromestatus <ad...@cr-status.appspotmail.com> wrote:Contact emails
chri...@chromium.orgExplainer
NoneSpecification
None
Summary
Currently setInterval with a value less than 1 is clamped to 1. This intent removes that restriction. Before: setInterval(..., 0) -> 1ms delay. After: setInterval(..., 0) -> 0ms delay. Notes: * This has no effect on the 4ms clamping for nested calls to timeouts. * setTimeout clamping was removed in a previous intent.
Blink component
Blink>Scheduling>APIsTAG review
NoneTAG review status
Not applicableRisks
Interoperability and Compatibility
Firefox already does not clamp setInterval to 1ms. Chromium-based browsers have not clamped setTimeout since 2022: https://groups.google.com/a/chromium.org/g/blink-dev/c/HKPTp7C1LwY/m/I0pm-cqFAQAJ Webkit removed clamping of setTimeout: https://bugs.webkit.org/show_bug.cgi?id=221124 Webkit still has clamping for setInterval: https://github.com/WebKit/WebKit/blob/main/Source/WebCore/page/DOMTimer.cpp#L54 Bug requesting removal of that: https://bugs.webkit.org/show_bug.cgi?id=286774
Gecko: Shipped/Shipping
WebKit: No signal
Web developers: No signals
Other signals:WebView application risks
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
No special risks for WebView.
Debuggability
None
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
NoIs this feature fully tested by web-platform-tests?
No
Flag name on about://flags
NoneFinch feature name
NoneNon-finch justification
None
Is this feature fully tested by web-platform-tests?
NoThis seems to be testable by checking the relative ordering of setTimeout(f,0) and setInterval(g,0), with a test like https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=13477 . Maybe you could add one?
justification
NoneA Finch flag seems important for this, just in case it causes compat issues.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/2842e492-ead5-49ab-b02a-62a7c85dd46bn%40chromium.org.