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

Method displayMessage

data/src/emulator.js:666–677  ·  view source on GitHub ↗
(message, time)

Source from the content-addressed store, hash-verified

664 return !!window.indexedDB && (typeof this.config.gameName === "string" || !this.config.gameUrl.startsWith("blob:"));
665 }
666 displayMessage(message, time) {
667 if (!this.msgElem) {
668 this.msgElem = this.createElement("div");
669 this.msgElem.classList.add("ejs_message");
670 this.elements.parent.appendChild(this.msgElem);
671 }
672 clearTimeout(this.msgTimeout);
673 this.msgTimeout = setTimeout(() => {
674 this.msgElem.innerText = "";
675 }, (typeof time === "number" && time > 0) ? time : 3000)
676 this.msgElem.innerText = message;
677 }
678 downloadStartState() {
679 return new Promise((resolve, reject) => {
680 if (typeof this.config.loadState !== "string" && !this.toData(this.config.loadState, true)) {

Callers 3

createContextMenuMethod · 0.95
createBottomMenuBarMethod · 0.95
simulateInputMethod · 0.80

Calls 1

createElementMethod · 0.95

Tested by

no test coverage detected