-
Notifications
You must be signed in to change notification settings - Fork 38
Questions about implementing clipboard.write #237
Copy link
Copy link
Open
Description
In the following steps, iterating over itemList:
https://un5gnp8dyv5rcyxcrjjbfp0.julianrbryant.com/clipboard-apis/#dom-clipboard-write
4. For each clipboardItem in dataList:
1. For each representation in clipboardItem’s clipboard item's list of representations:
(in this loop, we add items to `itemList`
2. For each blob in itemList:
5. Append cleanItem to cleanItemList.
3. Let option be clipboardItem’s clipboard item's presentation style.
4. Write blobs and option to the clipboard with cleanItemList and option.
After we writecleanItemList to the clipboard, we do not clear itemList over clearItemList. So on the next iteration of dataList, won't we write those same items again? These lists will just keep growing as we loop over dataList.
In the same steps, the spec seems to assume that the "2. React to representationDataPromise:" step will react synchronously. In practice, this occurs asynchronously, because even when the promise is already resolved, the reaction steps ultimately queue a microtask to run the fulfillment/rejection steps (via HostEnqueuePromiseJob).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels