mirror of
https://github.com/servo/servo
synced 2026-05-08 16:12:15 +02:00
Replaced the hand-written CONTENT_EVENT_HANDLER_NAMES list in eventtarget.rs with an auto-generated version. A new ContentEventHandlerNames method in codegen.py iterates through WebIDL descriptors whose prototype chain includes Node, collects attribute members with EventHandler callback types, and generates a sorted, duplicate free Rust array. The list is included from eventtarget.rs eliminating manual maintenance and ensuring it stays in sync automatically. Testing: Build passes with cargo build -j2 -p servo-script. The generated ContentEventHandlerNames.rs produces the same set of event handler names as the previous hand-written list. No new runtime tests are needed since this is a compile time change. Fixes: #43611 Signed-off-by: staysafe020 <jambongralpher@gmail.com>
381 KiB
381 KiB