oxjs/source/js/Ox.UI/Core/Ox.Clipboard.js
2011-04-25 11:12:02 +02:00

23 lines
576 B
JavaScript

// vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Clipboard = function() {
/***
Ox.Clipboard
Basic clipboard handler
Methods
copy(data) copy data to clipboard
paste paste data from clipboard
***/
var clipboard = {};
return {
_print: function() {
Ox.print(JSON.stringify(clipboard));
},
copy: function(data) {
clipboard = data;
Ox.print('copy', JSON.stringify(clipboard));
},
paste: function(type) {
return clipboard;
}
};
}();