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

Re: safeguarding a live getData() against looping scripts? (was: Re: clipboard events)

From: Daniel Cheng <dcheng@chromium.org>
Date: Tue, 17 May 2011 16:14:42 -0700
Message-ID: <BANLkTikm_e4nWZ7Qbyxr4MRKEJXpiAwsuQ@mail.gmail.com>
To: "Hallvord R. M. Steen" <hallvord@opera.com>
Cc: public-webapps@w3.org
On Tue, May 17, 2011 at 14:03, Hallvord R. M. Steen <hallvord@opera.com>wrote:

> On Tue, 17 May 2011 15:30:08 +0900, Daniel Cheng <dcheng@chromium.org>
> wrote:
>
>  I believe this problem is solvable without a spec change.
>>
>
> OK. I'd like to put in some non-normative warning or note about this
> problem though.
>
>
>  On Windows and Mac, implementations can use a native clipboard sequence
>> number to determine the contents of the clipboard have changed.
>>
>
> Interesting. What, in your view, should the implementation do if it
> discovers the contents has changed while a paste event thread is running?
>
>
> --
> Hallvord R. M. Steen, Core Tester, Opera Software
> http://www.opera.com http://my.opera.com/hallvors/
>

Safari returns an empty string from getData() if this happens. If the caller
is using event.clipboardData.items, maybe throw a DOM exception when
getAs*() is called.

Daniel
Received on Tuesday, 17 May 2011 23:15:07 GMT

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