W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: clipboard events

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Wed, 5 Jan 2011 23:27:33 -0800
Message-ID: <AANLkTinfrY+nEOXvFNrPmaAbzwq3k9AcEpb=YaqC5E8F@mail.gmail.com>
To: public-webapps <public-webapps@w3.org>
> getData
> Calling getData() from within a paste event handler will return the
> clipboard data in the specified format. An implementation must support
> 'text/plain' and should support 'text/html' to retrieve any HTML formatted
> data on the system clipboard.
> If getData() is not called from within a paste event handler, or if the
> type is not available, the method returns undefined. Note: IE allows this,
> but it seems to go against user expectations
What should we do if getData is called within a copy event handler?   We
have an outstanding bug that requests that getData returns the content
that's about to be copied into the clipboard (
https://bugs.webkit.org/show_bug.cgi?id=22017).  Should we consider such a

> Method exists in WebKit but doesn't seem to do anything
In WebKit, clipboard access is implemented by each port separately.  For
example, it's broken for Windows port (
https://bugs.webkit.org/show_bug.cgi?id=17645) but it works on Mac port.
(Note: we only support "text/plain" not "text").

If the type argument is not supported, the setData() call does nothing.
> setData() with unsupported type throws in IE
We should probably support text / URL as well.

Calling setData() from a paste event handler will modify the data before it
> is inserted. Not what WebKit does (but its support for setData() is
> non-existant anyway). IE does this.
And does not modify the clipboard?

- Ryosuke
Received on Thursday, 6 January 2011 07:36:43 UTC

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