1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 16:25:06 +00:00
serenity/Tests/LibWeb/Text/input/HTML/StructuredClone-object-primitives.html
Andrew Kaster 267074cd81 LibWeb: Add {de}serialization steps for RegExpObjects
We skip serializing any of the internal state of the Regex<ECMA262>
object, because that state is all computable from the input pattern
and flags. If it turns out that this is really, really slow, we can add
some optimizations to serialize more of the regex parse result.
2023-09-12 22:14:39 +02:00

21 lines
721 B
HTML

<script src="../include.js"></script>
<script>
test(() => {
println(structuredClone(new Boolean(true)));
println(structuredClone(new Boolean(false)));
println(structuredClone(new Number(123)));
println(structuredClone(new Number(123.456)));
println(structuredClone(new String("This is a String object")));
println(structuredClone(BigInt("0x1fffffffffffff")));
println(structuredClone(Date.UTC(2023, 7, 23)));
println(structuredClone(/abc/gimsuy));
try {
structuredClone(Symbol("foo"));
println("FAILED")
}
catch(e) {
println("ERROR: " + e.name + ": " + e.message)
}
});
</script>