From 9b1733d47edc8d8cd0d0f0214a57ac16b6c802e7 Mon Sep 17 00:00:00 2001 From: Anupam Snigdha Date: Wed, 1 Sep 2021 17:33:55 -0700 Subject: [PATCH 1/3] Add mandatory and optional data types list. --- index.bs | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/index.bs b/index.bs index 88078f6..0b18577 100644 --- a/index.bs +++ b/index.bs @@ -528,19 +528,17 @@ urlPrefix: https://w3c.github.io/FileAPI/#dfn-; type: dfn; corresponding native type exists on the clipboard: * text/plain - * text/uri-list - * text/csv - * text/css * text/html - * application/xhtml+xml * image/png + + These data types may be exposed by paste events if a + corresponding native type exists on the clipboard: + + * text/uri-list * image/jpg, image/jpeg * image/gif * image/svg+xml - * application/xml, text/xml - * application/javascript - * application/json - * application/octet-stream + * text/rtf

Writing to the clipboard

@@ -549,12 +547,18 @@ urlPrefix: https://w3c.github.io/FileAPI/#dfn-; type: dfn; copy and cut events. * text/plain - * text/uri-list - * text/csv * text/html + * image/png + + These data types may be placed on the clipboard with a corresponding + native type description if added to a {{DataTransfer}} object during + copy and cut events. + + * text/uri-list + * image/jpg, image/jpeg + * image/gif * image/svg+xml - * application/xml, text/xml - * application/json + * text/rtf Advisement: Warning! The data types that untrusted scripts are allowed to write to the clipboard are limited as a security precaution. Untrusted scripts can From ab37de6d3d25706c2bf7b349d20a5e781922f50e Mon Sep 17 00:00:00 2001 From: Anupam Snigdha Date: Wed, 15 Sep 2021 13:53:36 -0700 Subject: [PATCH 2/3] Add optional types separately. --- index.bs | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/index.bs b/index.bs index a6a45f7..e5eee68 100644 --- a/index.bs +++ b/index.bs @@ -531,15 +531,6 @@ urlPrefix: https://w3c.github.io/FileAPI/#dfn-; type: dfn; * text/html * image/png - These data types may be exposed by paste events if a - corresponding native type exists on the clipboard: - - * text/uri-list - * image/jpg, image/jpeg - * image/gif - * image/svg+xml - * text/rtf -

Writing to the clipboard

These data types must be placed on the clipboard with a corresponding @@ -550,15 +541,35 @@ urlPrefix: https://w3c.github.io/FileAPI/#dfn-; type: dfn; * text/html * image/png + Advisement: Warning! The data types that untrusted scripts are allowed to write to the + clipboard are limited as a security precaution. Untrusted scripts can + attempt to exploit security vulnerabilities in local software by placing + data known to trigger those vulnerabilities on the clipboard. + +

Optional data types

+ + The implementation must recognize the native OS clipboard format description + for the following data types, to be able to populate the + {{DataTransferItemList}} with the correct description for paste events, and + set the correct data format on the OS clipboard in response to copy and cut + events. + +

Reading from the clipboard

+ + These data types may be exposed by paste events if a + corresponding native type exists on the clipboard: + + * text/uri-list + * image/svg+xml + +

Writing to the clipboard

+ These data types may be placed on the clipboard with a corresponding native type description if added to a {{DataTransfer}} object during copy and cut events. * text/uri-list - * image/jpg, image/jpeg - * image/gif * image/svg+xml - * text/rtf Advisement: Warning! The data types that untrusted scripts are allowed to write to the clipboard are limited as a security precaution. Untrusted scripts can From dad7f771822655167733381637248752c005331a Mon Sep 17 00:00:00 2001 From: Anupam Snigdha Date: Tue, 21 Sep 2021 11:04:29 -0700 Subject: [PATCH 3/3] Remove optional data type. --- index.bs | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/index.bs b/index.bs index e5eee68..04171d6 100644 --- a/index.bs +++ b/index.bs @@ -546,36 +546,6 @@ urlPrefix: https://w3c.github.io/FileAPI/#dfn-; type: dfn; attempt to exploit security vulnerabilities in local software by placing data known to trigger those vulnerabilities on the clipboard. -

Optional data types

- - The implementation must recognize the native OS clipboard format description - for the following data types, to be able to populate the - {{DataTransferItemList}} with the correct description for paste events, and - set the correct data format on the OS clipboard in response to copy and cut - events. - -

Reading from the clipboard

- - These data types may be exposed by paste events if a - corresponding native type exists on the clipboard: - - * text/uri-list - * image/svg+xml - -

Writing to the clipboard

- - These data types may be placed on the clipboard with a corresponding - native type description if added to a {{DataTransfer}} object during - copy and cut events. - - * text/uri-list - * image/svg+xml - - Advisement: Warning! The data types that untrusted scripts are allowed to write to the - clipboard are limited as a security precaution. Untrusted scripts can - attempt to exploit security vulnerabilities in local software by placing - data known to trigger those vulnerabilities on the clipboard. -

Asynchronous Clipboard API