Skip to content

TT: AsyncFunction, AsyncGeneratorFunction, GeneratorFunction#28778

Merged
caugner merged 1 commit intomdn:mainfrom
hamishwillee:ff148tt_asyncfunction_generatorfunction
Jan 23, 2026
Merged

TT: AsyncFunction, AsyncGeneratorFunction, GeneratorFunction#28778
caugner merged 1 commit intomdn:mainfrom
hamishwillee:ff148tt_asyncfunction_generatorfunction

Conversation

@hamishwillee
Copy link
Contributor

The AsyncFunction(), GeneratorFunction(), and AsyncGeneratorFunction() contructors can execute their arguments as JavaScript. These are subclassed from Function() so share its TT behaviour.

This duplicates the TT entry from Function (I have tested that they work in Firefox only). NOTE, the spec URL used for Function was wrong. I can't find a better one though, so I have them all linked to https://w3c.github.io/trusted-types/dist/spec/#trustedscript

Related docs work tracked in mdn/content#41507

@github-actions github-actions bot added data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript size:m [PR only] 25-100 LoC changed labels Jan 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

@caugner caugner self-requested a review January 23, 2026 17:30
@caugner caugner merged commit 67a8c63 into mdn:main Jan 23, 2026
7 checks passed
@mdn-bot mdn-bot mentioned this pull request Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript size:m [PR only] 25-100 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants