2 var sb = new Cu.Sandbox("http://www.example.com", {
3 wantGlobalProperties: ["structuredClone"],
8 sb.testing = Cu.cloneInto({ xyz: 123 }, sb);
11 equal(structuredClone("abc"), "abc");
15 var clone = structuredClone(obj);
17 equal(clone.self, clone);
19 var ab = new ArrayBuffer(1);
20 clone = structuredClone(ab, { transfer: [ab] });
21 equal(clone.byteLength, 1);
22 equal(ab.byteLength, 0);
24 clone = structuredClone(testing);
25 equal(clone.xyz, 123);
30 const clone = structuredClone({ b: 2 });
31 Assert.equal(clone.b, 2);