Re: [w3c/editing] Add exceptions in read method. (PR #444)

@snianu commented on this pull request.



> @@ -185,8 +185,11 @@ EndFragment:<start offset of the end fragment comment tag>
 ```
 
 ### Read()
-Follow the algorithm specified in [read()](https://w3c.github.io/clipboard-apis/#dom-clipboard-read) except for the below step:
-1. If `text/html` representation is present in the [ClipboardItem](https://w3c.github.io/clipboard-apis/#clipboard-item-interface) and `text/html` is present in the `unsanitized` list, then return the blobData as-is without any sanitization.
+Follow the algorithm specified in [read()](https://w3c.github.io/clipboard-apis/#dom-clipboard-read) except for the below steps:
+1. If `text/html` representation is present in the [ClipboardItem](https://w3c.github.io/clipboard-apis/#clipboard-item-interface) and `text/html` is present in the `unsanitized` list, then follow the below steps:
+    1. If size of `unsanitized` list is greater than 1, then throw `Support to read multiple unsanitized formats is not implemented.` exception.

yeah not supported is actually better. I'll make the code changes as well. Thanks!

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/pull/444#discussion_r1353149863
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/editing/pull/444/review/1668622586@github.com>

Received on Tuesday, 10 October 2023 18:49:29 UTC