Files
scriptc/tests/corpus/js-deferred-registry-effects.js
Chris Tate a07998f667 Expand static three.js workflows and host integration (#621)
* Expand static three.js workflows and host integration

* Preserve JavaScript class state in static three.js workflows

* Preserve inferred JavaScript behavior across static workflows

* Preserve inferred callables and native compatibility boundaries

* Retain annotated JavaScript factory exports and bootstrap-safe call spreads

* Preserve Buffer and child callback identities in static packages

* Clarify JavaScript symbol spread support
2026-10-02 19:56:34 -05:00

18 lines
735 B
JavaScript

const events = [];
class Entry { constructor() { this.value = 7; } }
const registry = { item: Entry };
registry.item = Entry;
console.log(registry.item === Entry, new registry.item().value);
const data = { get Entry() { events.push("getter"); return Entry; } };
const unused = { Entry: data.Entry };
class Target {}
Object.defineProperty(Target.prototype, "selected", {
set(value) { events.push("setter:" + value.name); },
});
Target.prototype.selected = Entry;
const noPrototype = { __proto__: null, Entry };
console.log(Object.getPrototypeOf(noPrototype) === null, new noPrototype.Entry().value);
const frozen = Object.freeze({ Entry });
console.log(Object.isFrozen(frozen), frozen.Entry === Entry);
console.log(events.join(","));