onConsoleCloseButtonEnter()

in src/executable-code/executable-fragment.js [315:327]


  onConsoleCloseButtonEnter() {
    const { jsLibs, onCloseConsole, targetPlatform, compilerVersion } = this.state;
    // creates a new iframe and removes the old one, thereby stops execution of any running script
    if (isJsRelated(targetPlatform) || isWasmRelated(targetPlatform))
      this.jsExecutor.reloadIframeScripts(
        jsLibs,
        this.getNodeForMountIframe(),
        targetPlatform,
        compilerVersion,
      );
    this.update({ output: '', openConsole: false, exception: null });
    if (onCloseConsole) onCloseConsole();
  }