fix: link {{jsxref("Function")}} in callback parameter descriptions#44732
Open
caugner wants to merge 1 commit into
Open
fix: link {{jsxref("Function")}} in callback parameter descriptions#44732caugner wants to merge 1 commit into
{{jsxref("Function")}} in callback parameter descriptions#44732caugner wants to merge 1 commit into
Conversation
An upcoming version of the Rari build system resolves `jsxref` names
against an index and treats lowercase `{{jsxref("function")}}` as ambiguous
between the `function` operator and the `function` statement, so it no
longer resolves to a single page. These callback-parameter descriptions
mean a generic JavaScript function, so point them at the global `Function`
object, which resolves unambiguously.
Contributor
caugner
marked this pull request as ready for review
July 15, 2026 22:54
This was referenced Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replace the ambiguous lowercase
{{jsxref("function")}}with{{jsxref("Function")}}(the globalFunctionobject) in 7 callback-parameter descriptions across theWindow/WorkerGlobalScopetimer methods and thePromise()constructor.Motivation
An upcoming version of the Rari build system (mdn/rari#715) resolves
jsxrefnames against an index ofWeb/JavaScript/Reference/*pages. Lowercasefunctionis ambiguous between thefunctionoperator and thefunctionstatement, so it no longer resolves to a single page and produces a broken link. The current build tolerates it via redirect-following, so this is not yet a visible issue — this change is a preemptive cleanup so the pages keep resolving once that build change lands. Each of these descriptions refers to a generic JavaScript function (a callback), so the globalFunctionobject is the appropriate unambiguous target.Additional details
Affected pages:
Window.setInterval(),Window.setTimeout(),Window.queueMicrotask()WorkerGlobalScope.setInterval(),WorkerGlobalScope.setTimeout(),WorkerGlobalScope.queueMicrotask()Promise()constructorRelated issues and pull requests
Relates to mdn/rari#715.