-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Break snap preload script into two: a preload with no debug window an…
…d a preload that shows the snap debug window. (#726)
- Loading branch information
Showing
5 changed files
with
53 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 1 addition & 9 deletions
10
...integrate-with-snap/client/src/preload.ts → ...snap/client/src/preload/preload.common.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
how-to/integrate-with-snap/client/src/preload/preload.debug.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { initialize } from "./preload.common"; | ||
|
||
if (window === window.top) { | ||
console.log("Adding snap support through a debug preload."); | ||
|
||
window.addEventListener("DOMContentLoaded", async () => { | ||
await initialize({ platformId: fin.me.identity.uuid, showDebugWindow: true }); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { initialize } from "./preload.common"; | ||
|
||
if (window === window.top) { | ||
console.log("Adding snap support through a preload."); | ||
|
||
window.addEventListener("DOMContentLoaded", async () => { | ||
await initialize({ platformId: fin.me.identity.uuid, showDebugWindow: false }); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters