1 2 3 4 5 6 7 8 9 10 11 12 13 14
load(libdir + 'asserts.js'); load(libdir + 'evalInFrame.js'); class B { #x = 12; x = 'his'; ef(str) { return evalInFrame(0, str); } } var b = new B(); assertEq(b.ef(`this.x`), 'his'); assertEq(b.ef(`this.#x`), 12);