Skip to content

add type="built-in function"#676

Open
bakkot wants to merge 1 commit intomainfrom
built-in-functions
Open

add type="built-in function"#676
bakkot wants to merge 1 commit intomainfrom
built-in-functions

Conversation

@bakkot
Copy link
Member

@bakkot bakkot commented Feb 22, 2026

cf tc39/ecma262#3748 (comment)

That this does not include support for built-in getters/setters, nor for non-function properties. I can add those too if we want I guess, but they'd be handled differently since they do not have parameter lists.

I have a branch of ecma262 which adds type="built-in function" to all the relevant clauses (I think), which I have tested this against.

@jmdyck
Copy link
Contributor

jmdyck commented Feb 23, 2026

That this does not include support for built-in getters/setters, nor for non-function properties. I can add those too if we want I guess, but they'd be handled differently since they do not have parameter lists.

For another reason to handle them differently, consider, e.g., 22.2.6.3 get RegExp.prototype.dotAll. The section title suggests that the section is only about the get accessor function. But the preamble tells you that the set accessor function is undefined, so in fact the section is about both accessor functions, i.e. the whole accessor property, and it would be misleading for the section's type attribute to be "built-in function".

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.

2 participants