Re: [PATCH spice-html5 4/4] Use drag and drop for transfering files from client to guest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



+    for (var i = files.length - 1; i >= 0; i--) {

K&R...

+
+                if (window.File && window.FileReader && window.FileList && window.Blob) {
+                    document.getElementById('spice-area').addEventListener('dragover', handle_file_dragover, false);
+                    document.getElementById('spice-area').addEventListener('drop', handle_file_drop, false);
+                } else {
+                    console.log("File API is not supported");
+                }

K&R , and you should remove those event listeners on disconnect, so we don't try to drag into a non responsive area.

(ditto for spice_auto)

Cheers,

Jeremy
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]