LibWeb: Apply newTarget prototype in legacy factory constructors

Use WebIDL::set_prototype_from_new_target() in the handwritten Audio,
Image, and Option legacy factory constructors so subclassed
construction uses the correct prototype.

This corresponds to step 1.6 of:

https://webidl.spec.whatwg.org/#legacy-factory-functions
This commit is contained in:
Shannon Booth
2026-04-04 14:07:33 +02:00
committed by Shannon Booth
parent 85765ccb5c
commit 7f4600f0e9
Notes: github-actions[bot] 2026-04-05 00:10:32 +00:00
6 changed files with 45 additions and 3 deletions

View File

@@ -0,0 +1,6 @@
Harness status: OK
Found 1 tests
1 Pass
Pass [LegacyFactoryFunction] can be subclassed and correctly handles NewTarget