- From: snianu <notifications@github.com>
- Date: Tue, 02 Jan 2024 11:56:03 -0800
- To: w3c/editing <editing@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 2 January 2024 19:56:09 UTC
> Hmm, I was not fully understanding this issue back in the meeting, as my focus was on a different issue. To reiterate what @smaug---- said with some code, can this be: > > ```js > navigator.clipboard.write(new ClipboardItem({ > 'text/html': new ReadableStream({ > pull(controller) { > // This will only be called when the consumer reads it, so this is still about "have callback". > controller.enqueue(bytes); > }, > type: "bytes", > }, { highWaterMark: 0 }), > })); > ``` > > I think this can coexist with callback, though. What would the IDL look like? Can Blob APIs be used to stream data instead? Basically, in the callback, can the web authors use the streaming APIs to write data into the Blob? If so, then I'm not sure if this option would be helpful to add to the ClipboardItem IDL -- creates complexity in how the different chunks of data get written to the clipboard when the format is being requested during paste. -- Reply to this email directly or view it on GitHub: https://github.com/w3c/editing/issues/423#issuecomment-1874480052 You are receiving this because you are subscribed to this thread. Message ID: <w3c/editing/issues/423/1874480052@github.com>
Received on Tuesday, 2 January 2024 19:56:09 UTC