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

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 UTC