summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-02-08 10:48:01 -0500
committerJules Laplace <jules@okfoc.us>2015-02-08 10:48:01 -0500
commit2e48741de964422956fb81e474cf6303652ceefd (patch)
tree23cc8c142aa4779e60c302211777f1aff960480f /assets
parentf8e4a8c85890648f38dc8705e700d63252bb1dc2 (diff)
caveat about firefoxHEADmaster
Diffstat (limited to 'assets')
-rw-r--r--assets/test/clipboard.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/assets/test/clipboard.html b/assets/test/clipboard.html
index 9f70d89..c1c3294 100644
--- a/assets/test/clipboard.html
+++ b/assets/test/clipboard.html
@@ -17,6 +17,9 @@ document.body.addEventListener('copy', function (e) {
document.body.addEventListener('paste', function (e) {
+ // firefox does not have e.clipboardData.items,
+ // to get paste data use e.clipboardData.getData("text/html")
+ // only works with text..
toArray(e.clipboardData.items).forEach(function(item,i){
console.log(item.kind, item.type)
if (item.kind == 'file' && item.type.match('image/')) {
@@ -35,7 +38,7 @@ document.body.addEventListener('paste', function (e) {
}
img.src = blobUrl;
}
- // this can be text/plain or text/html..
+ // this can be text/plain or text/html
else if (item.kind == 'string') {
item.getAsString(function(text){
var node = document.createElement('span')
@@ -48,4 +51,4 @@ document.body.addEventListener('paste', function (e) {
}
})
})
-</script> \ No newline at end of file
+</script>