Commit 257bc30
authored
fix(engine): return null from IsHTMLDDA [[Call]] per Annex B §B.3.6.1 (#5511)
<!---
Thank you for contributing to Boa! Please fill out the template below,
and remove or add any
information as you feel necessary.
--->
This Pull Request fixes the return value of `IsHTMLDDA`'s `[[Call]]`
internal method.
According to ECMAScript Annex B §B.3.6.1 and test262's
`INTERPRETING.md`, objects with the `[[IsHTMLDDA]]` internal slot (such
as `$262.IsHTMLDDA` and `document.all`) must return `null` when called
with no arguments or with an empty string.
It changes the following:
- Change `is_html_dda_call` in `core/engine/src/builtins/is_html_dda.rs`
to return `JsValue::null()` instead of `JsValue::undefined()`.
- Update doc comments to cite Annex B §B.3.6.1.
- Resolves all 6 failing test262 tests in
`test/annexB/built-ins/String/prototype/` (`replace`, `replaceAll`,
`match`, `matchAll`, `split`, `search`
`custom-*-emulates-undefined.js`), bringing the suite to 100%
conformance (111/111 passed).1 parent 4b61183 commit 257bc30
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
| 62 | + | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
0 commit comments