1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 19:05:06 +00:00

LibWeb: Add TextEncoder encodeInto

This commit is contained in:
Bastiaan van der Plaat 2023-10-06 07:03:44 +02:00 committed by Andreas Kling
parent f1ead552ce
commit 0104225d9b
9 changed files with 123 additions and 10 deletions

View file

@ -1,12 +0,0 @@
<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>