items is referenced after it is no longer in scope ("if items has size > 0" comes after the scope of "Let items [...]"
"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
The steps in "Else" go 1, 2, 3, 1
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.
WRT https://w3c.github.io/clipboard-apis/#dom-clipboard-read
items
is referenced after it is no longer in scope ("ifitems
has size > 0" comes after the scope of "Letitems
[...]"data
is a Promise and the latterdata
is a sequence of bytesitem
is undefined AFAICTI 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.