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 23:49:33 -0700
Message-ID: <BANLkTim6F3=07ogO1U3m2S4wdSiC+p-phQ@mail.gmail.com>
To: "Hallvord R. M. Steen" <hallvord@opera.com>
Cc: public-webapps@w3.org
On Tue, May 17, 2011 at 22:07, Hallvord R. M. Steen <hallvord@opera.com>wrote:

> Should our implementation work harder to keep what we promise in
> clipboardData.items, or should we be content that such timing issues will be
> so rare that throwing is fine? After all, most applications manipulate the
> clipboard only in response to user input, which is a pretty modal source of
> events, and by definition the paste event will fire in response to user
> input within the document..
>
>
I think it's fine to simply throw as this typically happens in response to a
user action.


> Also, I'm not sure if we should process any HTML data on the clipboard
> (including possibly adding images and embedded content to
> clipboardData.items) before firing the paste event, or do so only if the
> script calls getData('text/html') within the paste event thread. Implementor
> feedback welcome!


Ideally we shouldn't manipulate any data until it's been requested by the
page, since reading data off the clipboard is a potentially slow operation.


>
>
> --
> Hallvord R. M. Steen, Core Tester, Opera Software
> http://www.opera.com http://my.opera.com/hallvors/
>
Received on Wednesday, 18 May 2011 06:49:59 GMT

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