aboutsummaryrefslogtreecommitdiff
path: root/vfs/example.html
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-08-29 16:43:12 +0700
committerShulhan <ms@kilabit.info>2021-08-29 16:43:12 +0700
commitdf4d520dca28e6907918f3ad67be58448dd92432 (patch)
tree2867d5e11d6e16f9688ae01fbb3ffeb2eb22a1fa /vfs/example.html
parent56062545762831be7b8c8cdead7d8cfaf182684a (diff)
downloadpakakeh.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.html5
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>