mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 22:35:07 +00:00
LibWeb: Make 'optional BufferSource' IDL arguments actually optional
Previously this was compiled to require an object despite the IDL file specifying 'optional'. This commit makes IDLGenerator respect this modifier, and fixes the only affected instance.
This commit is contained in:
parent
540ea9f1c4
commit
0e3fb39a0a
5 changed files with 36 additions and 4 deletions
12
Tests/LibWeb/Text/input/TextDecoder/TextDecoder_decode.html
Normal file
12
Tests/LibWeb/Text/input/TextDecoder/TextDecoder_decode.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
try {
|
||||
let decoder = new TextDecoder("utf-8");
|
||||
println(`[${decoder.decode(new Uint8Array([0x41, 0x42, 0x43]))}]`); // "ABC"
|
||||
println(`[${decoder.decode()}]`);
|
||||
} catch(e) {
|
||||
println("ERROR: " + e.name + ": " + e.message);
|
||||
}
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue