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: Hallvord R. M. Steen <hallvord@opera.com>
Date: Wed, 18 May 2011 18:16:43 +0900
To: "Daniel Cheng" <dcheng@chromium.org>
Cc: public-webapps@w3.org
Message-ID: <op.vvn6p5jwa3v5gv@hr-opera.oslo.opera.com>
On Wed, 18 May 2011 15:49:33 +0900, Daniel Cheng <dcheng@chromium.org>  
wrote:

>
>>  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.

What do you think about the current spec text? I've moved the section  
http://dev.w3.org/2006/webapi/clipops/clipops.html#processing-model-for-pasting-html-data  
to where we prepare the paste event, because integrating this into the  
HTML5 DataTransfer stuff becomes much easier this way. (Previously I  
spec'ed it so that this work would happen on a script calling  
getData('text/html') but that would require some hacking around with the  
getData() definition in HTML5.) This means we read and process the HTML  
part from the clipboard before firing paste, but any binary/embedded data  
will only be read "on demand".

-- 
Hallvord R. M. Steen, Core Tester, Opera Software
http://www.opera.com http://my.opera.com/hallvors/
Received on Wednesday, 18 May 2011 09:17:21 GMT

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