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: Joćo Eiras <joao.eiras@gmail.com>
Date: Thu, 19 May 2011 01:11:56 +0100
To: public-webapps@w3.org
Message-ID: <op.vvpb56e4jz3wb9@coruscant>
On , Hallvord R. M. Steen <hallvord@opera.com> wrote:

> On Thu, 19 May 2011 03:12:41 +0900, Daniel Cheng <dcheng@chromium.org>
> wrote:
> [Added back a bit more context since I add Ian to CC]
>>>>> 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.

getData and setData must work outside clipboard events, like when clicking paste/copy/cut buttons on a toolbar. The clipboardData object needs to be exposed on the window, like in IE.

To handle the getData case, I've thought of adding a proxy clipboard per browsing context. Read operations read from the proxy clipboard, write operations write to the proxy and system clipboards. User initiated actions like dropping, or pasting would update the proxy clipboard with the system clipboard contents, prior to the event being dispatched on the webpage.
Received on Thursday, 19 May 2011 00:12:27 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:32 UTC