Copyright
©
2006
2012
W3C
®
(
MIT
,
ERCIM
,
Keio
),
All
Rights
Reserved.
W3C
liability
,
trademark
and
document
use
rules
apply.
This
document
describes
apis
APIs
for
clipboard
operations
such
as
copy/cut
and
paste,
or
drag
copy,
cut
and
drop
paste
in
web
applications.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
This
document
is
the
First
Public
Working
Draft
prepared
of
Clipboard
Operations
from
the
Web
API
group
,
part
of
was
published
by
the
Rich
Web
Client
Activity.
In
large
part
it
describes
the
functionalities
Applications
Working
Group
as
implemented
in
Internet
Explorer,
and
has
not
been
sufficiently
tested
in
other
browsers
yet.
The
intention
of
this
document
is
where
possible
to
specify
what
actually
works
in
current
browsers,
or
is
a
simple
target
for
Working
Draft.
If
you
wish
to
make
comments
regarding
this
document,
please
send
them
to
improve
interoperability,
rather
than
adding
new
features.
public-webapps@w3.org
(
subscribe
,
archives
).
All
feedback
is
welcome.
A
second
diff
with
the
previous
version
of
this
specification
may
be
produced
which
extends
that
functionality
in
various
ways
which
have
proven
useful.
is
available.
Publication
as
a
Working
Draft
does
not
imply
endorsement
by
the
W3C
Membership.
This
document
is
published
to
solicit
comments
from
interested
parties.
All
comments
are
welcome
a
draft
document
and
may
be
sent
to
public-webapi@w3.org
.
All
messages
received
updated,
replaced
or
obsoleted
by
other
documents
at
this
address
are
viewable
in
a
public
archive
.
After
reviewing
comments
and
further
feedback,
the
Working
Group
intends
any
time.
It
is
inappropriate
to
publish
a
new
Working
Draft
of
cite
this
document
at
the
beginning
of
2007.
as
other
than
work
in
progress.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy . W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy .
ClipboardEventInit
Members
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key words must , must not , required , should , should not , recommended , may , and optional in this specification are to be interpreted as described in [ RFC2119 ].
This section is informative
This
specification
defines
the
common
clipboard
operations
of
cutting,
copying
and
pasting,
in
such
a
way
that
they
are
exposed
to
Web
Applications
and
can
be
adapted
to
provide
advanced
functionalities.
Its
goal
is
to
provide
for
compatibility
where
possible
with
existing
implmentations.
Recognising
that
"drag
and
drop"
operations
are
essentially
a
common
user
interface
extension
of
cut
or
copy,
move,
and
paste,
it
also
defines
how
the
events
currently
implemented
for
"drag
and
drop"
operations
relate
to
the
less
device-specific
approach
of
general
clipboard
operations.
A
common
interface
design
in
the
traditional
WIMP
(Windows,
Icons,
Mouse
Pointer)
interface
is
to
move
the
pointer
to
an
icon
or
to
a
highlighted
selection,
press
the
mouse
key
and
drag
a
copy
of
the
icon
to
the
target
where
s/he
wants
to
drop
the
object,
then
release
the
mouse
key.
There
are,
of
course,
many
alternatives.
In
a
graphic
user
interface
without
a
mouse
a
user
might
select
an
object
for
dragging
through
a
context
menu,
navigate
to
another
object
through
standard
navigation,
and
then
select
to
drop
the
held
object.
implementations.
This section is informative
There
are
many
use
cases
for
being
able
to
change
the
default
clipboard
operations
(cut/copy/paste,
and
the
related
drag-and-drop).
(cut/copy/paste).
We
have
colected
collected
a
few
samples
to
demonstrate
possible
uses,
although
these
may
not
all
be
supoprted
supported
by
this
specification.
Allowing
for
interfaces
that
use
a
thumbnail
image
to
refer
to
a
block
of
content,
When
copying
text
which
can
then
contains
hyperlinks
or
other
structure,
it
is
often
useful
to
be
dragged
able
to
insert
reformat
the
block
of
content
represented
in
another
part
of
a
to
preserve
important
information.
In
order
to
make
web
page.
The
common
Drag-and-drop
pardigm
must
be
implementable
in
applications
which
allow
the
manipulation
of
rich
text,
or
of
graphic
content
such
a
way
that
as
SVG,
it
is
accessible
to
users
who
are
unable
useful
to
use
a
mouse
(such
as
those
on
provide
a
phone
where
there
is
no
mouse)
and
must
rely
on
keyboard
or
other
interfaces.
mechanism
that
allows
for
copying
more
than
just
the
rendered
content.
With
content
such
as
mathematics,
simply
copying
rendered
text
and
pasting
it
into
another
application
generally
leads
to
most
of
the
semantics
being
lost.
The
following
example,
when
copied,
typically
adds
two
lines
containing
the
text
"2
x
=
7"
to
the
clipboard.
But
in
the
MathML
source
of
this
text,
and
for
any
human
reader
familiar
with
normal
western
conventions
for
mathematical
layout,
this
leads
to
incorrect
copying.
The
first
line
would
often
needs
to
be
transformed
to
be
better,
if
copied
as
plain
text,
as
"2^x
=
7",
or
if
for
example
to
make
sure
"to
the
power
of"
is
shown
with
the
caret
"^"
sign
in
a
formula
plain-text
input.
The
XML
source
could
also
be
placed
in
the
clipboard
with
the
appropriate
transformation
occurring
when
pasting.
Example
1:
Mathematical
information
at
paste
time.
Similarly,
when
copying
text
which
contains
hyperlinks
or
other
structure,
it
This
section
is
often
useful
to
be
able
to
reformat
informative.
Implementation
details
are
given
in
the
content
to
preserve
important
information.
processing
model
section.
And
in
order
to
make
web
applications
which
allow
When
the
manipulation
of
rich
text,
or
of
graphic
content
such
as
SVG,
it
user
initiates
a
copy
operation,
the
implementation
fires
a
clipboard
event
named
copy
.
Its
default
action
is
useful
to
provide
a
mechanism
that
allows
for
copying
more
than
just
place
the
rendered
content.
selected
data
on
the
clipboard.
The
terms
must
,
should
,
may
,
must
current
selection
is
not
,
should
affected.
If
there
is
no
selection,
the
clipboard
is
not
,
are
used
in
this
document
modified
except
if
the
default
action
is
prevented
and
the
script
has
added
entries
in
accordance
with
[
RFC2119
the
DataTransferItemList
,
for
example
by
calling
the
].
A
conformant
implementation
of
this
specification
meets
all
requirements
identified
use
of
these
terms.
setData()
method.
Enabling
authors
to
change
what
is
copied
by
When
the
user
initiates
a
user,
or
to
make
cut
operation,
the
implementation
fires
a
clipboard
event
named
cut
.
In
an
automated
copy
of
something
that
was
never
selected
and
allowing
unrestricted
calls
to
paste
information
can
raise
various
security
concerns.
If
these
operations
are
allowed
editable
context,
its
default
action
is
to
transfer
place
the
selected
data
across
documents
from
different
sources
then
there
are
even
greater
risks
imaginable.
On
on
the
other
hand
there
are
valid
reasons
for
allowing
this
in
clipboard
and
remove
the
right
circumstances.
selection
from
the
document.
An
example
scenario
of
In
a
problem
non-editable
context,
or
if
there
is
where
a
user
selects
a
link
and
copies
it,
but
a
different
link
no
selection,
the
cut
event's
default
action
is
copied
to
the
clipboard.
do
nothing.
The
effect
of
this
can
range
from
an
unexpected
result
on
pasting
to
an
attempted
"phishing"
attack.
Authors
be
aware
that
User
Agents
will
typically
restrict
what
implementation
fires
the
event
regardless.
If
the
default
action
is
possible
to
content
they
consider
"safe",
or
trusted
by
do
nothing,
the
user.
For
example,
it
may
clipboard
is
not
be
possible
to
launch
some
of
modified
except
if
the
operations
from
script,
such
as
requiring
an
actual
(not
simulated
or
script-generated)
user
default
action
to
paste
or
drop.
is
prevented
and
the
script
has
added
entries
in
the
DataTransferItemList
.
Implementors
should
carefully
consider
The
cut
event
fires
before
the
security
implications
of
implementing
this
specification,
and
provide
appropriate
protection
for
users
against
malicious
use,
such
as
restricting
access
to
selected
data
is
removed.
When
the
functionalities
according
to
how
trusted
cut
operation
is
completed,
the
source
selection
is
collapsed.
If
content
in
the
document
is
selected,
the
default
action
of
a
function
call
is,
or
informing
the
user
when
something
other
than
rendered
content
copy
event
is
copied
to
place
the
selection
on
the
clipboard.
This
specification
will
attempt
to
highlight
all
areas
where
possible
security
issues
arise,
but
If
content
is
selected
and
the
final
responsibility
for
making
decisions
about
what
to
allow
rests
with
user
agent
implementors.
Note
that
this
selection
is
not
done
in
an
editable
context,
the
current
draft.
@@Issue:
identify
what
default
action
of
a
cut
event
is
to
place
the
restrictions
generally
used
are,
as
some
guidance
selection
on
interoperability
User
Interface
Issues
This
section
is
informative
This
specification
does
not
define
all
the
user
interface
modes
that
can
be
used
to
select
content,
but
this
section
attempts
to
provide
a
survey
of
some
common
ones.
Authors
clipboard
and
implementors
should
be
aware
that
remove
it
from
the
precise
User
Interface
details
will
vary
according
document.
Hence,
the
script
calling
setData()
also
needs
to
cancel
the
use
case
and
platform,
default
action
of
the
event
with
different
methods
applying
for
Mouse/Keyboard
and
window
based
interfaces
Keyboard
only
interface
Voice
interfaces
Stylus-based
interfaces
Restricted
keyboards,
such
as
event.preventDefault().
Otherwise,
the
data
the
script
intends
to
place
on
mobile
telephones
Multimodal
interfaces,
where
part
of
an
operation
may
the
clipboard
will
be
initiated
through
voice
while
another
part
is
controlled
through
a
stylus,
or
other
combinations
overwritten
by
the
default
action.
Many
of
these
When
the
user
interfaces
have
developed
common
interaction
paradigms
(in
initiates
a
paste
operation,
the
case
of
implementation
fires
a
clipboard
event
named
paste
.
The
event
fires
before
any
clipboard
data
is
inserted.
If
the
common
mouse/keyboard/window
interface
there
are
several
which
are
expected
cursor
is
in
an
editable
element,
the
default
action
is
to
interact
seamlessly)
insert
clipboard
data
in
the
most
suitable
format
supported
for
copy
and
the
given
context.
The
paste
at
least.
Other
may
be
less
common
and
have
event
has
no
emerging
convention,
while
other
interfaces
may
be
developed.
In
each
case,
the
events
and
results
described
below
should
be
mapped
by
default
action
in
a
non-editable
context,
but
the
platform
to
particular
user
interaction.
event
fires
regardless.
Another
method
that
can
be
used
When
pasting,
the
drag
data
store
mode
flag
is
to
provide
read-only
,
hence
calling
setData()
from
a
copy/paste
paste
event
handler
will
not
modify
the
data
that
is
inserted,
and
copy
special/paste
special
set
of
operations,
to
distinguish
between
copying
simple
or
structured
content
to
not
modify
the
data
on
the
clipboard.
These
are
well-understood
operations
for
users.
There
are
the
general
steps
to
follow
when
firing
clipboard
events
fired
during
selection,
cut/copy
and
paste
in
some
systems
already
which
can
.
DataTransfer
object
[
HTML5-DND
]
the
BODY
element
if
there
is
the
setData
method's
).
BODY
element
if
no
node
has
focus.
Set
the
associated
DataTransfer
object's
drag
data
store
mode
flag
to
read-only
Each
copy-paste
operation
has
4
distinct
phases:
For
each
part
on
the
OS
clipboard,
carry
out
these
steps:
DataTransferItemList
for
any
clipboard
operation.
with
drag
data
item
kind
set
to
string
and
drag
data
item
type
string
set
to
text/plain
DataTransferItemList
to
the
clipboardData
What
is
if
the
downside?
MIME
type
is
unknown?
Use
application/octet-stream?
If the implementation supports pasting HTML, the implementation must process the markup according to the following steps:
DataTransferItemList
with
drag
data
item
kind
set
to
Plain
Unicode
string
,
drag
data
item
type
string
set
to
text/html
or
application/xhtml+xml
accordingly.
Let
mainPartIndex
be
the
DataTransferItemList
.
DataTransferItemList
Choose the appropriate steps from this list:
DataTransferItemList
copy
DataTransfer
object
DataTransferItemList
with
cut
index
If unknown..? Should we simply ignore embeds with file types we don't "know"?
DataTransferItemList
entry
referenced
by
mainPartIndex
with
the
resulting
HTML
code
DataTransferItemList
with
drag
data
item
kind
set
to
Update
the
files
property
to
match
entries
in
the
keyboard
as
for
a
copy
operation.
[@@Issue:
nice
idea,
does
it
reflect
current
reality?
Opera/Safari
on
Mac
don't
do
that...]
.
DataTransferItemList
.
Update
the
paste
types
triggers
an
event
on
property
to
match
entries
in
the
current
target
(usually
DataTransferItemList
.
Set
the
current
selection).
@@Issue:
For
associated
DataTransfer
object's
drag
and
drop
compatibility
should
it
trigger
data
store
mode
flag
to
drop
read/write
and
paste
,
or
vice
versa?
Drag
Fire
the
event
[
DOM-LEVEL-2-EVENTS
].
Implementation
requirements
for
access
to
data
during
event
dispatch
are
defined
in
[
HTML5-DND
].
Some
additional
clipboard
event-specific
processing
rules
are
given
below:
clearData()
or
items.clear()
and
DataTransfer
object's
drag
data
store
mode
flag
is
setData()
or
setData()
's
type
argument
or
the
new
getData()
or
accesses
items
in
the
DataTransferItemList
and
clipboard-entry
is
set
DataTransferItemList
object's
drag
data
store
mode
to
the
disabled
mode
Warning:
A
malicious
script
listening
to
a
paste
event
may
be
copied
set
up
a
never-ending
loop
in
order
to
read
what
the
user
places
on
the
clipboard
in
the
future.
On
platforms
where
a
temporary
drag-specific
clipboard.
Compare
clipboard
sequence
number
is
not
available,
other
limitations
should
be
implemented.
Process
the
default
action
or
the
data
from
the
script
per
the
following
phases
with
those
in
copy
and
paste:
instructions:
Update
the
currently
selected
source.
This
must
fire
a
dragstart
event.
It
must
copy
clipboard
contents
with
the
source
node
into
dataTransfer
.
It
should
set
data
from
the
effectAllowed
property
to
determine
whether
a
drag
operation
copies,
moves,
links,
etc
script,
as
given
by
the
source
node.
See
[
MDT
DataTransferItemList
.
Process
each
part
as
follows:
]
for
further
documentation
Place
part
on
clipboard
with
the
same
mechanism
as
used
for
selection,
although
typical
implementations
provide
a
seperate
mechanism.
These
events
appropriate
OS
clipboard
format
description
Note:
Due
to
limitations
in
the
implementation
of
operating
system
clipboards,
scripts
should
not
fired
assume
that
custom
formats
will
be
available
to
other
applications
on
the
source,
so
until
system.
For
example,
there
is
a
dragenter
event
fired,
a
drop
event
should
not
be
fired.
Any
action
which
would
have
caused
a
drop
limit
to
how
many
custom
clipboard
formats
can
be
fired
before
registered
in
Microsoft
Windows.
While
it
is
possible
to
use
any
dragenter
event
has
fired
should
cancel
the
drag.
string
for
setData()'s
type
argument,
sticking
to
well-known
types
is
strongly
recommended.
Do nothing, terminate this algorithm
Calling
setData()
without
calling
preventDefault()
has
no
effect,
even
if
there
is
no
selection
-
the
operation
default
action
is
not
successful?
to
do
nothing.
However
it
The
ClipboardEvent
interface
extends
the
Event
interface
[
DOM-LEVEL-2-EVENTS
].
The
interface
can
be
used
to
construct
event
objects
per
[
DOM-CORE-DRAFT
].
An
example
is
implemented
in
an
interface,
drag
and
drop
operations
must
have
given
below:
var pasteEvent = new ClipboardEvent('paste', { bubbles: true, cancelable: true, dataType: 'text/plain', data: 'My string' } ); document.dispatchEvent(pasteEvent);
There
should
be
a
starting
point
(e.g.
where
the
mouse
was
clicked,
or
the
when
way
a
selection
or
element
script
can
check
if
a
clipboard
format
is
selected
for
the
drag),
may
have
any
number
of
intermediate
steps
(elements
that
registered
and
whether
the
mouse
moves
over
during
a
drag,
or
elements
that
implementation
allows
writing
this
format
to
the
user
picks
as
possible
drop
points
clipboard!
event.clipboardData.isTypeSupported('mime/type')?
"Supported"
means:
if
you
give
me
data
labelled
as
she
cycles
through
possibilities),
this
type,
I
know
the
OS
description
and
must
either
have
an
end
point
(the
element
above
which
(if
applicable)
the
mouse
button
was
released,
or
relevant
meta
data
and
formatting
for
this
type,
and
can
write
it
to
the
element
clipboard
so
that
was
finally
selected),
other
native
apps
can
make
use
of
it.
If
data
labelled
with
the
OS's
native
name
or
be
canceled.
The
end
point
must
be
constant
for
this
type
is
on
the
last
element
selected
as
clipboard,
I
can
map
it
to
the
mime
type
and
extract
the
data
in
a
possible
drop
point
before
way
the
drop
occurs.
If
there
script
can
use.
Additionally,
if
a
blob
of
data
in
this
format
is
no
dragenter
event
fired
after
dropped
on
my
window,
I'll
know
what
to
do
about
it,
and
if
you
drag
this
data
*from*
my
window
to
another
application
on
the
system,
I
can
format
and
label
it
in
a
dragstart
,
then
way
the
drop
targe
app
will
understand."
A
synthetic
paste
event
should
must
not
be
cancelled,
but
give
a
script
access
to
data
on
the
real
system
clipboard.
Synthetic
cut
and
copy
events
may
must
not
be
fired
modify
data
on
the
source
node
.
system
clipboard.
Then,
regardless
of
whether
the
Synthetic
paste
events
do
not
have
any
default
action.
Even
if
such
an
event
was
canceled
or
not,
drag
feedback
(e.g.
the
mouse
cursor
or
other
clear
indication
to
is
dispatched
in
an
editable
context,
the
user)
implementation
should
must
not
be
updated
to
match
the
kind
of
operation
indicated
by
the
event's
dataTransfer
object's
dropEffect
attribute,
as
follows:
@@Issue:
More
info
about
setting
the
dropEffect
would
be
useful
insert
any
data.
dictionary ClipboardEventInit : EventInit {
attribute DOMString data;
attribute DOMString dataType;
};
ClipboardEventInit
dragstart
data
of
type
dataType
of
type
attribute
DOMString
[Constructor(DOMString type, optional ClipboardEventInit eventInitDict)]
interface ClipboardEvent : Event {
readonly attribute DataTransfer clipboardData;
};
dragenter
clipboardData
of
type
The
clipboardData
attribute
is
an
instance
of
the
body
element
DataTransfer
âÄî
Based
on
effectAllowed
value
Change
interface
which
lets
a
script
read
and
manipulate
values
on
the
current
target
element
system
clipboard
during
user-initiated
copy,
cut
and
paste
operations.
The
associated
drag
data
store
is
a
live
but
filtered
view
of
the
system
clipboard,
exposing
data
types
the
implementation
knows
the
script
can
safely
access.
The clipboardData object's items and files properties enable processing of multi-part or non-textual data from the clipboard.
If
an
implementation
supports
the
element
this
document.execCommand
method
and
allows
calling
it
with
the
commands
"cut",
"copy"
and
"paste",
the
implementation
must
fire
the
corresponding
events.
The
event
is
fired
on.
@@Issue:
syncronous
and
may
prevent
the
execCommand()
call
from
having
its
normal
effect.
If
it
the
clipboard
operation
is
fired
triggered
by
keyboard
input,
the
implementation
must
fire
the
corresponding
event
as
the
default
action
of
the
keydown
event
that
initiates
the
clipboard
operation.
For
example,
if
the
user
presses
Ctrl-C
to
copy,
dispatching
a
copy
event
must
be
the
default
action
of
the
C
key's
keydown
event.
The
event
is
asynchronous
but
must
be
dispatched
before
keyup
events
for
the
relevant
keys.
The default action of the cut and paste events may cause the implementation to dispatch other supported events, such as textInput, input, change, validation events, DOMCharacterDataModified and DOMNodeRemoved / DOMNodeInserted. Any such events are queued up to fire after processing of the cut/paste event is finished.
The implementation must not dispatch other input-related events like textInput, input, change, and validation events in response to the copy operation.
If
the
event
listener
modifies
the
selection
or
focus,
the
clipboard
action
must
be
completed
on
the
body,
this
text
isn't
right...
dragleave
modified
selection.
Not
cancelable
âÄî
This
section
is
informative.
none
There are certain security risks associated with pasting formatted or multi-part data.
To determine what policies to use, the factors we consider are
This is an overview of the scenarios and the possible security policies:
Origin of data | Origin of script | Rules |
---|---|---|
Originates from online source |
|
|
| Sanitize content. Do not access any local files. | |
|
|
|
The
implementation
must
not
download
referenced
online
resources,
or
expose
their
contents
in
the
or
dragend
FileList
.
Source
node
DataTransferItemList
âÄî
none
Varies
Setting
and
getting
If
the
data
on
the
clipboard
is
not
from
a
local
application,
the
implementation
must
not
give
access
to
any
referenced
local
files.
For
example,
if
the
data
contains
<img
src="file://localhost/example.jpg">
but
the
data's
origin
is
an
online
resource,
the
implementation
must
not
add
an
entry
for
example.jpg
to
be
transferred
the
clipboardData.items
list.
Internet
Explorer
provides
3
methods
for
If
the
clipboardData
data
originates
from
a
web
site,
and
dataTransfer
objects:
the
origin
of
the
web
site
and
the
origin
of
the
document
associated
with
the
script
that
created
the
event
listener
differs,
the
implementation
may
apply
a
sanitization
algorithm
before
exposing
HTML
data.
This
takes
section
is
informative
Pasting
HTML
and
other
markup-based
content
copied
from
one
or
two
parameters.
The
first
site
into
another
site
might
compromise
the
security
of
the
former
site,
for
example
by
giving
the
second
site
access
to
passwords,
nonces
and
other
sensitive
data
that
might
be
embedded
in
the
markup.
Implementations
must
may
therefore
decide
to
use
a
cross-origin
paste
sanitization
algorithm
to
attempt
removing
hidden
data
the
user
is
likely
not
aware
of
pasting.
One
example
of
such
an
algorithm
might
be
the
following:
In
order
to
protect
the
target
site
from
script
injection,
the
implementation
may
process
the
markup
to
request
a
specific
type
remove
scripting
languages.
One
example
of
data.
clearData()
This
clears
such
an
algorithm
might
be
the
data
following:
Implementations may let the user indicate that an app is trusted to not attack other apps and apply its own safety measures, thus bypass the above algorithm. Implementations may also implement additional restrictions, for example only support text/plain if the user does a cross-origin paste, or only support text/plain if content from an encrypted origin is pasted into a non-encrypted page.
Don't
extend
this
yet,
we
haven't
even
specified
it.
Thanks!!!
Enabling
authors
to
change
what
is
copied
by
a
user,
or
to
make
an
automated
copy
of
something
that
was
never
selected
and
allowing
unrestricted
calls
to
paste
information
can
raise
various
security
and
privacy
concerns.
An
example
scenario
of
a
problem
is
where
a
user
selects
a
link
and
copies
it,
but
a
different
link
is
copied
to
the
source
clipboard.
The
effect
of
this
can
range
from
an
unexpected
result
on
pasting
to
an
attempted
"phishing"
attack.
Untrusted
scripts
should
not
get
uncontrolled
access
to
a
user's
clipboard
data.
This
specification
assumes
that
granting
access
to
the
object
current
clipboard
data
when
a
user
explicitly
initiates
a
paste
operation
from
the
UA's
trusted
chrome
is
acceptable.
However,
implementors
must
proceed
carefully,
and
as
a
minimum
implement
the
precautions
below:
Implementations may choose to further limit the functionality provided by the DataTransfer interface. For example, an implementation may allow the user to disable this API, or configure which web sites should be granted access to it.
Scripts may use the DataTransfer API to annoy and confuse users by altering the data on the system clipboard from copy and cut events. This specification does not attempt to prevent such nuisances, though implementations may add additional restrictions.
Implementations must handle scripts that try to place excessive amounts of data on the clipboard gracefully.
The
implementation
must
recognise
the
native
OS
clipboard
format
description
for
how
the
following
data
types,
to
use
english
be
able
to
specify
normativity,
as
if
it
were
a
technical
language.
Available
at
http://rfc.net/rfc2119.html
populate
the
DataTransferItemList
with
the
correct
description
for
paste
events,
and
set
the
correct
data
format
on
the
OS
clipboard
in
response
to
copy
and
cut
events.
Informative
References
[MDT]
Microsoft's
informatio
What about audio and video types? BMP? RTF? RTF was requested due to embedded images possibility (but this spec allows access to local images referenced in HTML fragments by design..).
Some standard Windows formats we don't handle DataFormats.CF_RTFTEXT DataFormats.CF_WAVE DataFormats.CF_RIFF DataFormats.CF_BITMAP DataFormats.CF_DIB DataFormats.CF_DIF DataFormats.CF_METAFILEPICT DataFormats.CF_PALETTE DataFormats.CF_TIFF
This section is informative
The editors would like to acknowledge their intellectual debt to the documentation of Data Transfer functionalities from Microsoft [