Skip to content

fix: link {{jsxref("Function")}} in callback parameter descriptions#44732

Open
caugner wants to merge 1 commit into
mainfrom
jsxref-function-casing
Open

fix: link {{jsxref("Function")}} in callback parameter descriptions#44732
caugner wants to merge 1 commit into
mainfrom
jsxref-function-casing

Conversation

@caugner

@caugner caugner commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Description

Replace the ambiguous lowercase {{jsxref("function")}} with {{jsxref("Function")}} (the global Function object) in 7 callback-parameter descriptions across the Window/WorkerGlobalScope timer methods and the Promise() constructor.

Motivation

An upcoming version of the Rari build system (mdn/rari#715) resolves jsxref names against an index of Web/JavaScript/Reference/* pages. Lowercase function is ambiguous between the function operator and the function statement, 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 global Function object is the appropriate unambiguous target.

Additional details

Affected pages:

  • Window.setInterval(), Window.setTimeout(), Window.queueMicrotask()
  • WorkerGlobalScope.setInterval(), WorkerGlobalScope.setTimeout(), WorkerGlobalScope.queueMicrotask()
  • Promise() constructor

Related issues and pull requests

Relates to mdn/rari#715.

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.
@github-actions github-actions Bot added Content:WebAPI Web API docs Content:JS JavaScript docs size/s [PR only] 6-50 LoC changed labels Jul 15, 2026
@caugner
caugner marked this pull request as ready for review July 15, 2026 22:54
@caugner
caugner requested review from a team as code owners July 15, 2026 22:54
@caugner
caugner requested review from wbamberg and removed request for a team July 15, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:JS JavaScript docs Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants