()
| 6 | interface Window { |
| 7 | demoPluginCleanedUp?: boolean |
| 8 | demoPluginConnectedOnMount?: boolean |
| 9 | } |
| 10 | } |
| 11 | |
| 12 | function DemoPlugin() { |
| 13 | const [count, setCount] = createSignal(0) |
| 14 | const [text, setText] = createSignal('') |
| 15 | let input!: HTMLInputElement |
| 16 | // The plugin's nodes must be in the page when onSettled runs. |
| 17 | onSettled(() => { |
| 18 | window.demoPluginConnectedOnMount = input.isConnected |
| 19 | }) |
| 20 | onCleanup(() => { |
| 21 | window.demoPluginCleanedUp = true |
| 22 | }) |
| 23 | return ( |
| 24 | <> |
| 25 | <button data-testid="demo-plugin" onClick={() => setCount(count() + 1)}> |
nothing calls this directly
no outgoing calls
no test coverage detected