Clipboard.js 377 B

12345678910111213141516171819202122232425
  1. /**
  2. * A clip board stub
  3. */
  4. export default function Clipboard() {}
  5. Clipboard.prototype.get = function() {
  6. return this._data;
  7. };
  8. Clipboard.prototype.set = function(data) {
  9. this._data = data;
  10. };
  11. Clipboard.prototype.clear = function() {
  12. var data = this._data;
  13. delete this._data;
  14. return data;
  15. };
  16. Clipboard.prototype.isEmpty = function() {
  17. return !this._data;
  18. };