Bug
1850820 [wpt PR 41722] - [Clipboard] Write well-formed HTML to the clipboard using async API., a=testonly
Automatic update from web-platform-tests
[Clipboard] Write well-formed HTML to the clipboard using async API.
In this change we use the below algorithm to write a well-formed HTML document
to the clipboard using `write()` method:
1. Create a DOMParser using blink::DOMParser::Create.
2. Call DOMParser’s parseFromString method to parse the html string provided
by the web authors.
3. Serialize the document returned from step 2.
4. Return the serialized html string from step 3.
Input to async write method:
"<head><script><\/script><style> p {font-color: red; background-color: blue;}</style></head> <body><p>html text</p></body>"
Output to the clipboard:
"<html><head><script></script><style> p {font-color: red; background-color: blue;}</style></head> <body><p>html text</p></body></html>"
Explainer: https://github.com/w3c/editing/blob/gh-pages/docs/clipboard-unsanitized/explainer.md
Bug:
1268679
Change-Id: Ia1973d47400717a32b3218900ab900f061b2ce02
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
4811743
Commit-Queue: Anupam Snigdha <snianu@microsoft.com>
Reviewed-by: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/main@{#
1205576}
--
wpt-commits:
a70bfbabfecca734b244ec975bbb8ef0c03db78b
wpt-pr: 41722