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

Method destroyAndFocus

lib/modAssist_window_lib.js:517–526  ·  view source on GitHub ↗

* Destroy named window, focus mini or main window after * @param {string} name window

(name)

Source from the content-addressed store, hash-verified

515 * @param {string} name window
516 */
517 destroyAndFocus (name) {
518 this.win[name] = null
519 if ( this.isValid('main') ) {
520 if ( !this.isVisible('main') && this.isValid('mini') && this.isVisible('mini') ) {
521 this.win.mini.focus()
522 } else {
523 this.win.main.focus()
524 }
525 }
526 }
527
528 destroyAndFocusMulti () {
529 this.multiWin = this.multiWin.filter((x) => !x.isDestroyed())

Callers 2

createNamedWindowMethod · 0.80
createMainWindowMethod · 0.80

Calls 2

isValidMethod · 0.80
isVisibleMethod · 0.80

Tested by

no test coverage detected