Skip to content

Conversation

@hamishwillee
Copy link
Collaborator

The AsyncFunction(), GeneratorFunction(), and AsyncGeneratorFunction() contructors can execute their arguments as JavaScript.

These are subclasses of Function(), which is documented in

What this does is:

  • Add the three functions to the list of injection sinks
  • Add the warning header and a comment to the examples section for each. These link to the Function() security section and exmples.

IMO this is sufficient.

Related docs work tracked in #41507

@hamishwillee hamishwillee requested review from a team as code owners January 9, 2026 00:23
@hamishwillee hamishwillee requested review from Josh-Cena and wbamberg and removed request for a team January 9, 2026 00:23
@github-actions github-actions bot added Content:WebAPI Web API docs Content:JS JavaScript docs labels Jan 9, 2026
@github-actions github-actions bot added the size/m [PR only] 51-500 LoC changed label Jan 9, 2026
hamishwillee and others added 2 commits January 9, 2026 11:49
…ion/asyncfunction/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added size/s [PR only] 6-50 LoC changed and removed size/m [PR only] 51-500 LoC changed labels Jan 21, 2026
@github-actions github-actions bot added size/m [PR only] 51-500 LoC changed and removed size/s [PR only] 6-50 LoC changed labels Jan 21, 2026
Copy link
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for not responding to your earlier queries! I was slow at getting back on track. I do have a few holdover changes regarding #42462 and I snuck them into this PR. Mostly minor wording changes. I'm totally find with mentioning TrustedScript within JS docs.

@Josh-Cena Josh-Cena merged commit fefa80c into mdn:main Jan 21, 2026
8 checks passed
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/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants