diff options
| author | Shulhan <ms@kilabit.info> | 2021-08-29 16:43:12 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-08-29 16:43:12 +0700 |
| commit | df4d520dca28e6907918f3ad67be58448dd92432 (patch) | |
| tree | 2867d5e11d6e16f9688ae01fbb3ffeb2eb22a1fa /vfs/example.html | |
| parent | 56062545762831be7b8c8cdead7d8cfaf182684a (diff) | |
| download | pakakeh.ts-df4d520dca28e6907918f3ad67be58448dd92432.tar.xz | |
vfs: add handler OpenNode to WuiVfsOptions
The OpenNode define an handler that will be called when a node is
clicked from the WuiVfsList.
Diffstat (limited to 'vfs/example.html')
| -rw-r--r-- | vfs/example.html | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vfs/example.html b/vfs/example.html index 1ebc1b4..4e28bf8 100644 --- a/vfs/example.html +++ b/vfs/example.html @@ -87,6 +87,7 @@ let opts = { id: "vfs", Open: Open, + OpenNode: OpenNode, } wui_vfs = new WuiVfs(opts) @@ -134,6 +135,10 @@ console.log("Open:", res) } + + function OpenNode(node) { + Open(node.path, node.is_dir) + } </script> </body> </html> |
