MCPcopy Index your code
hub / github.com/EmulatorJS/EmulatorJS / on

Method on

data/src/emulator.js:407–411  ·  view source on GitHub ↗
(event, func)

Source from the content-addressed store, hash-verified

405 }
406 }
407 on(event, func) {
408 if (!this.functions) this.functions = {};
409 if (!Array.isArray(this.functions[event])) this.functions[event] = [];
410 this.functions[event].push(func);
411 }
412 callEvent(event, data) {
413 if (!this.functions) this.functions = {};
414 if (!Array.isArray(this.functions[event])) return 0;

Callers 15

constructorMethod · 0.95
setupAdsMethod · 0.95
downloadStartStateMethod · 0.95
createBottomMenuBarMethod · 0.95
setVirtualGamepadMethod · 0.95
setupSettingsMenuMethod · 0.95
build.jsFile · 0.45
loader.jsFile · 0.45
socket.io.min.jsFile · 0.45
ItFunction · 0.45
constructorMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected