* Raise or create the named window, run the callback on completion * @param {string} name window * @param {function} callback
(name, callback)
| 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 |
no test coverage detected