diff --git a/how-to/use-window-options/client/src/app.ts b/how-to/use-window-options/client/src/app.ts index 9c63b81c..53f87c5e 100644 --- a/how-to/use-window-options/client/src/app.ts +++ b/how-to/use-window-options/client/src/app.ts @@ -2,12 +2,12 @@ import type OpenFin from "@openfin/core"; const defaultCommonOptions: OpenFin.WindowCreationOptions = { name: "test-child", - url: "./preview.html", + url: window.location.href.replace("app.html", "preview.html"), icon: undefined, autoShow: true, alwaysOnTop: false, opacity: 1, - contextMenu: true, + contextMenuOptions: { enabled: true }, showTaskbarIcon: true, resizable: true, minimizable: true, @@ -106,11 +106,6 @@ async function initDom(): Promise { const btnPreview = document.querySelector("#btnPreview"); if (btnPreview) { btnPreview.addEventListener("click", async () => { - if (previewWindow) { - await previewWindow.removeAllListeners(); - await previewWindow.close(true); - previewWindow = undefined; - } const previewOptions: OpenFin.WindowCreationOptions = { ...finalizeWindowOptions(), saveWindowState: false diff --git a/how-to/use-window-options/public/html/app.html b/how-to/use-window-options/public/html/app.html index 5fcefe98..197060a2 100644 --- a/how-to/use-window-options/public/html/app.html +++ b/how-to/use-window-options/public/html/app.html @@ -5,7 +5,7 @@ Window Options Builder - + @@ -16,7 +16,7 @@

Window Options Builder

Demonstrate the customization options available for opening windows.

- OpenFin + OpenFin
@@ -76,14 +76,14 @@

Common

- +
- +
@@ -92,14 +92,14 @@

Common

- +
- +
@@ -234,7 +234,7 @@

Preview

- +
diff --git a/how-to/use-window-options/public/html/preview.html b/how-to/use-window-options/public/html/preview.html index 678ee1a1..33ca4046 100644 --- a/how-to/use-window-options/public/html/preview.html +++ b/how-to/use-window-options/public/html/preview.html @@ -5,113 +5,99 @@ Window Options Preview - +

Window Options Preview

-

Demonstrate the customization options available for opening windows.

+

Demonstrate customized window.

- OpenFin + OpenFin
-
-
This is the preview window.
-
-
-
- - - - +
+

+
+ + +
+
-
-
+ +