Intent to Implement and Ship: DataTransfer constructor

71 views
Skip to first unread message

Gary Kačmarčík (Кошмарчик)

unread,
Mar 29, 2017, 5:25:48 PM3/29/17
to blink-dev
Contact emails

Spec

Summary
The new asynchronous clipboard API makes use of DataTransfer objects and has a need to be able to construct new ones.

For example (with new clipboard api):
var data = new DataTransfer();
data.items.add("\(°o°)/", "text/plain");
navigator.clipboard.write(data).then(function() {
    console.log(“Copied to clipboard successfully! ᕕ( ᐛ )ᕗ”);
}, function() {
    console.error(“Unable to write to clipboard. (╯ಠ_ಠ)╯︵ ┻━┻”);
});

Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.

Interoperability and Compatibility Risk
This feature is part of the Async Clipboard API discussion, which has received positive feedback from FF/Edge/Safari and web developers.
For this specific feature, various FF developers were involved in discussions when updating the HTML spec to include this:

Interop risk is low since this is simply adding a constructor to the DataTransfer object. No other changes to DataTransfer are included.

OWP launch tracking bug
crbug.com/677564 (Shared with Async Clipboard API)

Entry on the feature dashboard

Changelist

Chris Harrelson

unread,
Mar 30, 2017, 12:24:58 PM3/30/17
to Gary Kačmarčík (Кошмарчик), blink-dev
LGTM1

I see there is also a web-platform-test for this constructor. Great!

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Dimitri Glazkov

unread,
Mar 31, 2017, 10:33:14 AM3/31/17
to Chris Harrelson, Gary Kačmarčík (Кошмарчик), blink-dev
LGTM2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Rick Byers

unread,
Mar 31, 2017, 4:55:51 PM3/31/17
to Dimitri Glazkov, Chris Harrelson, Gary Kačmarčík (Кошмарчик), blink-dev
LGTM3

LGTM2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Jochen Eisinger

unread,
Mar 31, 2017, 5:02:41 PM3/31/17
to Rick Byers, Dimitri Glazkov, Chris Harrelson, Gary Kačmarčík (Кошмарчик), blink-dev
Please ensure that either you have security approval on the launch bug (crbug.com/677565) before shipping this, or that the security review is triggered early enough, and you are confident that you can incorporate any requests they might have before the branch point.

LGTM3

LGTM2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Gary Kačmarčík (Кошмарчик)

unread,
Mar 31, 2017, 5:16:23 PM3/31/17
to Jochen Eisinger, Rick Byers, Dimitri Glazkov, Chris Harrelson, blink-dev
We have security (et al) reviews planned for the Async Clipboard API, but did not think they were required for adding a constructor to an existing type.

Does it require a separate review? If so, I'll have to split that out into a separate bug.

LGTM3

LGTM2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.


Jochen Eisinger

unread,
Apr 3, 2017, 12:48:11 AM4/3/17
to Gary Kačmarčík (Кошмарчик), Rick Byers, Dimitri Glazkov, Chris Harrelson, blink-dev
ah, I just concluded from your example that the clipboard API was already a thing, and was just worried that there wasn't progress on the security review yet.

No need to block the constructor on the review!

LGTM3

LGTM2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.


Gary Kačmarčík (Кошмарчик)

unread,
Apr 3, 2017, 1:04:10 PM4/3/17
to Jochen Eisinger, Rick Byers, Dimitri Glazkov, Chris Harrelson, blink-dev
Oh good. I was worried that I needed to re-calibrate my internal threshold for items should trigger a security review. ^_^

LGTM3

LGTM2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.



Reply all
Reply to author
Forward
0 new messages