api.Window.requestIdleCallback - Safari is Supported
What type of issue is this?
Incorrect support data (example: BrowserX says "86" but support was added in "40")
What information was incorrect, unhelpful, or incomplete?
According to https://bugs.webkit.org/show_bug.cgi?id=164193, https://github.com/WebKit/WebKit/pull/16813, and https://bugs.webkit.org/show_bug.cgi?id=260369
requestIdleCallback is supported by Safari now.
What browsers does this problem apply to, if applicable?
Safari
What did you expect to see?
The minimum version of the support with caveats
Did you test this? If so, how?
I did not but I trust the people in the threads and PRs linked.
Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
https://bugs.webkit.org/show_bug.cgi?id=164193, https://github.com/WebKit/WebKit/pull/16813 https://bugs.webkit.org/show_bug.cgi?id=260369
Do you have anything more you want to share?
No response
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback
MDN metadata
MDN page report details
- Query:
api.Window.requestIdleCallback - Report started: 2024-09-30T04:53:13.762Z
I came to report this same issue because I saw the webkit ticket was closed
However I tested on Safari 18.1 and window.requestIdleCallback is undefined, so the MDN docs are correct as it stands
according to https://caniuse.com/requestidlecallback it can be enabled in Safari, but is disabled by default. But Safari Technology Preview has it enabled by default since release 178: https://developer.apple.com/documentation/safari-technology-preview-release-notes/stp-release-178
Most recently, the "requestIdleCallback" setting was disabled again, see https://bugs.webkit.org/show_bug.cgi?id=287681 and https://github.com/WebKit/WebKit/commit/e6f3a0be1963ab4d20681401c0bf3261047a6af2, so it is no longer enabled by default in Safari TP.
It looks like the feature was originally implemented in https://github.com/WebKit/WebKit/commit/b7bc61d59e5e7ef50ac23d72fe09a9e49186c6fb (WebKit 617.1.5) before Safari 17.2 (WebKit 617.1.17).
The safest thing to do here would be to set all Safari support statements for BCD features tagged with web-features:requestidlecallback to:
{
"version_added": "preview",
"flags": [
{
"type": "preference",
"name": "requestIdleCallback",
"value_to_set": "true"
}
]
}
@Aghassi @michaelboyles @MaxEtMoritz Would one of you be interested in opening a PR with these changes?