x4js - v2.3.33
    Preparing search index...

    Interface ClipboardRead

    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.

    interface ClipboardRead {
        files: File[];
        image?: Blob;
        text?: string;
    }

    Hierarchy (View Summary)

    Index
    files: File[]

    all the files, the images too; none out of an event

    image?: Blob

    written as a PNG, the format every browser takes: another one is converted

    text?: string