Skip to content

Add linkable definitions for extension functions. - #3809

Open
caugner wants to merge 1 commit into
KhronosGroup:mainfrom
caugner:3808-extension-function-ids
Open

caugner wants to merge 1 commit into
KhronosGroup:mainfrom
caugner:3808-extension-function-ids

Conversation

@caugner

@caugner caugner commented Nov 25, 2026

Copy link
Copy Markdown

Fixes #3808.

Gives each function in the "New Functions" section of the extension specs an id of the form DOM-<extension>-<function> with a self-link, and links the function names in the IDL block to these definitions. This follows the core spec's DOM-<interface>-<member> ids.

For example, polygonModeWEBGL in WEBGL_polygon_mode gets the anchor #DOM-WEBGL_polygon_mode-polygonModeWEBGL.

"New Tokens" repeats function names, so it gets no id. Apart from the new id attributes and links, the output of make is unchanged. Function names in "New Functions" and in the IDL block become links, rendered underlined in the text color (per resources/default.css).

Rendered HTML diff for WEBGL_polygon_mode
-    undefined polygonModeWEBGL(GLenum face, GLenum mode);
+    undefined <a href="#DOM-WEBGL_polygon_mode-polygonModeWEBGL">polygonModeWEBGL</a>(GLenum face, GLenum mode);
-<dt class="idl-code">undefined polygonModeWEBGL(GLenum face, GLenum mode)</dt>
+<dt class="idl-code" id="DOM-WEBGL_polygon_mode-polygonModeWEBGL">undefined <a href="#DOM-WEBGL_polygon_mode-polygonModeWEBGL">polygonModeWEBGL</a>(GLenum face, GLenum mode)</dt>

ANGLE_instanced_arrays, WEBGL_draw_buffers, and WEBGL_provoking_vertex declare their methods only in the IDL, without a "New Functions" section, so they get no anchors yet. Adding <newfun> entries to them would be enough.

Give each function in "New Functions" an `id` of the form `DOM-<extension>-<function>` (following the core spec's `DOM-<interface>-<member>` ids) with a self-link, and link the function names in the IDL block to their definitions. "New Tokens" repeats function names, so it gets no `id`.
@CLAassistant

CLAassistant commented Nov 25, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@caugner
caugner marked this pull request as ready for review November 25, 2026 20:33

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add linkable definitions for functions in extension specs

2 participants