boa_runtime 0.21.1

Example runtime for the Boa JavaScript engine.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
// From https://developer.mozilla.org/en-US/docs/Web/API/Window/structuredClone#description

// Create an object with a value and a circular reference to itself.
const original = { name: "MDN" };
original.itself = original;

// Clone it
const clone = structuredClone(original);

assertNEq(clone, original); // the objects are not the same (not same identity)
assertEq(clone.name, "MDN"); // they do have the same values
assertEq(clone.itself, clone); // and the circular reference is preserved