Files
test-repo/tests/format/js/class/class-fields-features.js
T
2026-09-11 17:15:23 +08:00

16 lines
303 B
JavaScript

class Foo {
static epoch = new CustomDate(0);
#xValue = 0;
get #x() { return this.#xValue; }
set #x(value) {
this.#xValue = value;
window.requestAnimationFrame(this.#render.bind(this));
}
#clicked() {
this.#x++;
}
#render() {
this.textContent = this.#x.toString();
}
}