Add an opt-in context menu for files and directories

Apps set browser.contextMenu to a list of { label, action, when?, danger? }
items; when(entry, path) scopes an item to directories, files, or any
other match. Right-click, the Menu key, or a touch long press opens it.
The demo adds sample items, including a .json-only one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-23 18:50:21 -07:00
co-authored by Claude Opus 5.5
parent 13e2654415
commit d8b8012e40
12 changed files with 292 additions and 18 deletions
+1
View File
@@ -10,6 +10,7 @@
<body>
<main>
<octopus-file-browser></octopus-file-browser>
<p class="demo-status" role="status">Right-click or long-press a file or folder.</p>
</main>
<script type="module" src="/src/demo.js"></script>
</body>