The clipboard of the system: a text, an image, files.
There are two ways to it, and they do not give the same things.
In a "copy", "cut" or "paste" event (the keys of the user, the menu of
the browser), the browser gives its clipboard at once and asks nothing:
setEventClipboard, getEventClipboard. It is the only way to read files.
Out of an event (a menu, a button), the system is asked: setClipboard,
getClipboard. It is asynchronous, the browser may ask the user for a
permission or refuse, and there is nothing to ask on a page that is not
served in https. So what the application set last is kept: it is what is
read when the system does not answer, and copy and paste still work
inside the application.
The clipboard of the system: a text, an image, files.
There are two ways to it, and they do not give the same things.
In a "copy", "cut" or "paste" event (the keys of the user, the menu of the browser), the browser gives its clipboard at once and asks nothing: setEventClipboard, getEventClipboard. It is the only way to read files.
Out of an event (a menu, a button), the system is asked: setClipboard, getClipboard. It is asynchronous, the browser may ask the user for a permission or refuse, and there is nothing to ask on a page that is not served in https. So what the application set last is kept: it is what is read when the system does not answer, and copy and paste still work inside the application.
Files cannot be written, in neither way.