clipboard-apis icon indicating copy to clipboard operation
clipboard-apis copied to clipboard

read(formats) ambiguous

Open evanstade opened this issue 1 year ago • 0 comments

WRT https://w3c.github.io/clipboard-apis/#dom-clipboard-read

  1. items is referenced after it is no longer in scope ("if items has size > 0" comes after the scope of "Let items [...]"
  2. "Set representation’s data to systemClipboardRepresentation’s data." has a type mismatch, because the former data is a Promise and the latter data is a sequence of bytes
  3. The steps in "Else" go 1, 2, 3, 1
  4. In the text "If customItem’s list of representations size is greater than 0, append item to items.", item is undefined AFAICT

I also can't figure out why there are two different places where the algorithm says "Run the read web custom format algorithm", perhaps because the above issues (and others?) are making it difficult to understand the flow.

evanstade avatar Jan 12 '24 20:01 evanstade