diff options
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/app.mjs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/web/app.mjs b/src/web/app.mjs index 3d32a16b..d7a4b6f6 100644 --- a/src/web/app.mjs +++ b/src/web/app.mjs @@ -329,6 +329,11 @@ export class PardesRuntime { download(data, "pardes-dump.zon", "text/plain;charset=utf-8"); } else if (kind === 7) { navigator.clipboard?.writeText(decoder.decode(data)).catch(() => {}); + } else if (kind === 13) { + // Async and permission-gated, unlike every other effect here: a refused + // or unsupported read is simply a paste that never happens, which is + // what the core already tolerates from an empty clipboard. + navigator.clipboard?.readText().then((text) => this.wasm.pardes_paste(this.writeInput(text))).catch(() => {}); } else if (kind === 10) { this.running = false; } else { |
