pb: copy to the clipboard in the browser

Instead of erroring, the wasm `pb` branch now writes the inner command's data to the
host page's clipboard via navigator.clipboard (new hel_clipboard_write host hook).
Runs inside the Enter-keypress handler, so the clipboard user-gesture requirement is
met. Native pbcopy/xclip path unchanged.
This commit is contained in:
Oleksandr Kozachuk
2026-06-09 23:51:51 +02:00
parent 30fbc1caae
commit 7c651d0bb5
4 changed files with 19 additions and 1 deletions
+3
View File
@@ -142,6 +142,9 @@ function __wbg_get_imports() {
const ret = arg0.getTimezoneOffset();
return ret;
},
__wbg_hel_clipboard_write_efa8177dd67c65ec: function(arg0, arg1) {
hel_clipboard_write(getStringFromWasm0(arg0, arg1));
},
__wbg_hel_get_password_271a2beac04c29db: function(arg0, arg1, arg2) {
const ret = hel_get_password(getStringFromWasm0(arg1, arg2));
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);