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: Sat, 21 May 2011 15:38:00 +0900
To: public-webapps@w3.org, João Eiras <joao.eiras@gmail.com>
Message-ID: <op.vvtjdmx2a3v5gv@hr-opera.oslo.opera.com>
On Thu, 19 May 2011 09:43:33 +0900, João Eiras <joao.eiras@gmail.com>  

>>> getData and setData must work outside clipboard events, like when
>>> clicking paste/copy/cut buttons on a toolbar.
>> I think this is covered by execCommand('Paste') etc.
> But there is no way to access the clipboard contents. Or does  
> execCommand dispatch a synchronous event ?

Yes, it does. See  

I expect implementations to let users configure if a site/app is allowed  
to use execCommand for cut/copy/paste, perhaps with a prompt on first use.

> What if the event is prevented ? Does execCommand return false ?

I don't know much about what execCommand is meant to return, but e.g.  
doing execCommand('copy') and then event.preventDefault() from a 'copy'  
event listener is intended to prevent copying.

Hallvord R. M. Steen, Core Tester, Opera Software
http://www.opera.com http://my.opera.com/hallvors/
Received on Saturday, 21 May 2011 06:38:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:19 UTC