Create the project directory and initialize an npm project
mkdir my-plugin && cd my-plugin
npm init -y| type State = { | |
| added: boolean; | |
| interval: false | ReturnType<typeof setInterval>; | |
| inFrame: boolean; | |
| callbacks: Array<SetFocusedCallback>; | |
| }; | |
| type EnrichedHTMLIFrameElement = HTMLIFrameElement & { ___onWindowFocusHandled: boolean }; | |
| type SetFocusedCallback = (focused?: boolean) => void; |