MCPcopy Create free account
hub / github.com/FSGModding/FSG_Mod_Assistant / raiseOrOpen

Method raiseOrOpen

lib/modAssist_window_lib.js:502–511  ·  view source on GitHub ↗

* Raise or create the named window, run the callback on completion * @param {string} name window * @param {function} callback

(name, callback)

Source from the content-addressed store, hash-verified

500 * @param {function} callback
501 */
502 raiseOrOpen(name, callback) {
503 let timeoutAmount = 0
504 if ( !this.isValid(name) ) {
505 timeoutAmount = 500
506 this.createNamedWindow(name)
507 } else if ( !this.isVisible(name) ) {
508 this.forceFocus(name)
509 }
510 setTimeout(() => { callback() }, timeoutAmount)
511 }
512
513 /**
514 * Destroy named window, focus mini or main window after

Callers 3

openCompareWindowFunction · 0.80
openBaseGameWindowFunction · 0.80

Calls 4

isValidMethod · 0.80
createNamedWindowMethod · 0.80
isVisibleMethod · 0.80
forceFocusMethod · 0.80

Tested by

no test coverage detected