oxjs/source/js/Ox.UI/Core/Ox.Clipboard.js

24 lines
576 B
JavaScript
Raw Normal View History

2011-04-23 16:45:50 +00:00
// vim: et:ts=4:sw=4:sts=4:ft=js
2011-04-22 22:03:10 +00:00
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;
}
};
}();