W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

Re: CfC: new WD of Clipboard API and Events; deadline April 5

From: Daniel Cheng <dcheng@chromium.org>
Date: Mon, 11 Apr 2011 19:28:17 -0700
Message-ID: <BANLkTi=cWTq6VUi7S3tGf4S84r=_p6a90Q@mail.gmail.com>
To: Charles McCathieNevile <chaals@opera.com>
Cc: public-webapps <public-webapps@w3.org>, timeless <timeless@gmail.com>
On Sun, Apr 10, 2011 at 11:30, Charles McCathieNevile <chaals@opera.com>wrote:

> comments on a couple of timeless' comments.
>
>
> On Sun, 10 Apr 2011 18:20:35 +0200, timeless <timeless@gmail.com> wrote:
>
>> Calling clearData() empties the system clipboard, or removes the specified
>>> type of data from the clipboard. See HTML5 for details [HTML5].
>>>
>>
>> This has issues. If the user has inserted something the user cares
>> about into the system clipboard, then allowing a web page to stomp on
>> it is annoying.  Something needs to protect the user from such web
>> apps.
>>
>
> Yes - should that comment be on HTML5 though, or alternatively is there a
> reason not to copy it?


I'm not sure the spec needs to go out of its way to guard against this.
Typically, when writing to a clipboard, you'd clear all the data on the
clipboard before writing the new data; otherwise, you might end up with text
from one window, HTML from another, and a URL from a third. A page that
wanted to stomp on user data could simply do something like
event.clipboardData.setData('text/plain', '').

Daniel
Received on Tuesday, 12 April 2011 02:28:42 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:44 GMT