Skip to content

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).

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.

1 participant