Open file import

Summary: This change only adds the PWA as capable of handling files with the ".flipper" extension.

Reviewed By: aigoncharov

Differential Revision: D48353437

fbshipit-source-id: fd78942ac4dffb7d26d5ca5be826290018465b93
This commit is contained in:
Lorenzo Blasa
2023-08-17 13:46:08 -07:00
committed by Facebook GitHub Bot
parent 9728155cbf
commit ce13ee426f
13 changed files with 150 additions and 106 deletions

View File

@@ -153,11 +153,13 @@ export function initializeRenderHost(
hasFocus() {
return document.hasFocus();
},
onIpcEvent(_event) {
// no-op
onIpcEvent(event, cb) {
window.addEventListener(event as string, (ev) => {
cb(...((ev as CustomEvent).detail as any));
});
},
sendIpcEvent(_event, ..._args: any[]) {
// no-op
sendIpcEvent(event, ...args: any[]) {
window.dispatchEvent(new CustomEvent(event, {detail: args}));
},
shouldUseDarkColors() {
return !!(