Ox.Clipboard: add public 'items' method (returns number of items)
This commit is contained in:
parent
2435dd2804
commit
43502c42a1
1 changed files with 3 additions and 0 deletions
|
@ -44,6 +44,9 @@ Ox.Clipboard = (function() {
|
||||||
$element && $element.triggerEvent('copy', clipboard);
|
$element && $element.triggerEvent('copy', clipboard);
|
||||||
return clipboard.items.length;
|
return clipboard.items.length;
|
||||||
},
|
},
|
||||||
|
items: function(type) {
|
||||||
|
return !type || type == clipboard.type ? clipboard.items.length : 0;
|
||||||
|
},
|
||||||
paste: function(type) {
|
paste: function(type) {
|
||||||
return !type || type == clipboard.type ? clipboard.items : [];
|
return !type || type == clipboard.type ? clipboard.items : [];
|
||||||
$element && $element.triggerEvent('paste', clipboard);
|
$element && $element.triggerEvent('paste', clipboard);
|
||||||
|
|
Loading…
Reference in a new issue