Conversation
Test262 conformance changes
Tested main commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5269 +/- ##
===========================================
+ Coverage 47.24% 59.76% +12.51%
===========================================
Files 476 589 +113
Lines 46892 63476 +16584
===========================================
+ Hits 22154 37935 +15781
- Misses 24738 25541 +803 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| ) -> JsResult<()> { | ||
| if event_type.to_std_string_escaped() != "abort" { | ||
| return Err(js_error!(TypeError: "AbortSignal only supports the 'abort' event type")); | ||
| return Ok(()); |
There was a problem hiding this comment.
This is also kinda not conformant though. According to the spec, we should be appending all event listeners irrespective of their type to the listeners, just making sure to not push two event listeners with the same type and callback
ref: https://dom.spec.whatwg.org/#dom-eventtarget-addeventlistener
Fixes #5260.
This makes AbortSignal.addEventListener ignore non abort event names instead of throwing.
It keeps the abort listener path the same and adds tests for ignored event names.
Tests: