You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After #588 (which closed #554), eslint-plugin-compat correctly detects some usages of requestIdleCallback() (which is still not supported in Safari 18.3), but not all:
// ✓ correctly detected as not supported:window.requestIdleCallback();// ⨉ not detectedrequestIdleCallback();// ⨉ not detectedconstmywindow=window;mywindow.requestIdleCallback();// ⨉ not detecteddocument.querySelector('iframe').contentWindow.requestIdleCallback()
I can only speculate that it is a performance optimization to match only CallExpressions where the callee is a MemberExpression with the object being an Identifier named "window" and the property also being an Identifier named "requestIdleCallback", i.e.
or, on the other hand, CallExpressions where the callee is a MemberExpression with the property being an Identifier named "requestIdleCallback", no matter what the object is, like
Uh oh!
There was an error while loading. Please reload this page.
After #588 (which closed #554), eslint-plugin-compat correctly detects some usages of
requestIdleCallback()
(which is still not supported in Safari 18.3), but not all:I can only speculate that it is a performance optimization to match only CallExpressions where the callee is a MemberExpression with the object being an Identifier named "window" and the property also being an Identifier named "requestIdleCallback", i.e.
Matching, on the one hand, CallExpressions with an Identifier named "window" being the direct callee, like
or, on the other hand, CallExpressions where the callee is a MemberExpression with the property being an Identifier named "requestIdleCallback", no matter what the object is, like
or, maybe too broad, just matching the Identifier "requestIdleCallback" in general, without considering CallExpressions, like
could solve this.
(On a side note: what an awesome project, thank you so much for this effort!)
Edit: should this issue have been directly reported for ast-metadata-inferer instead?
The text was updated successfully, but these errors were encountered: