| 65 | * @see https://eruda.liriliri.io/docs/plugin.html |
| 66 | */ |
| 67 | export interface Tool { |
| 68 | /** |
| 69 | * Every plugin must have a unique name, which will be shown as the tab name on the top. |
| 70 | */ |
| 71 | name: string |
| 72 | /** |
| 73 | * Called when plugin is added, and a document element used to display content is passed in. |
| 74 | * The element is wrapped as a jQuery like object, provided by the licia utility library. |
| 75 | */ |
| 76 | init(el: unknown): void |
| 77 | /** |
| 78 | * Called when switch to the panel. Usually all you need to do is to show the container element. |
| 79 | */ |
| 80 | show(): Tool | undefined |
| 81 | /** |
| 82 | * Called when switch to other panel. You should at least hide the container element here. |
| 83 | */ |
| 84 | hide(): Tool | undefined |
| 85 | /** |
| 86 | * Called when plugin is removed using `eruda.remove('plugin name')`. |
| 87 | */ |
| 88 | destroy(): void |
| 89 | } |
| 90 | |
| 91 | export interface ToolConstructor { |
| 92 | new (): Tool |
no outgoing calls
no test coverage detected
searching dependent graphs…