MCPcopy
hub / github.com/Pradumnasaraf/DevOps / legacyModuleProp

Function legacyModuleProp

docs/webassembly/files/apps/hello-world/hello.js:787–798  ·  view source on GitHub ↗
(prop, newName, incoming=true)

Source from the content-addressed store, hash-verified

785}
786
787function legacyModuleProp(prop, newName, incoming=true) {
788 if (!Object.getOwnPropertyDescriptor(Module, prop)) {
789 Object.defineProperty(Module, prop, {
790 configurable: true,
791 get() {
792 let extra = incoming ? ' (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)' : '';
793 abort(`\`Module.${prop}\` has been replaced by \`${newName}\`` + extra);
794
795 }
796 });
797 }
798}
799
800function ignoredModuleProp(prop) {
801 if (Object.getOwnPropertyDescriptor(Module, prop)) {

Callers 1

hello.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected