mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibWeb: Add TextEncoder encodeInto
This commit is contained in:
committed by
Andreas Kling
parent
f1ead552ce
commit
0104225d9b
12
Tests/LibWeb/Text/input/Encoding/TextDecoder-decode.html
Normal file
12
Tests/LibWeb/Text/input/Encoding/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>
|
||||
Reference in New Issue
Block a user