Commit f4906838 f4906838fc14954353bed04ad248b3dee1e6c145 by Nicolas Perriault

better mouse event names

1 parent 157c1028
...@@ -55,7 +55,7 @@ var Mouse = function(casper) { ...@@ -55,7 +55,7 @@ var Mouse = function(casper) {
55 throw new Error('Unsupported mouse event type: ' + type); 55 throw new Error('Unsupported mouse event type: ' + type);
56 } 56 }
57 args = Array.prototype.slice.call(args); // cast Arguments -> Array 57 args = Array.prototype.slice.call(args); // cast Arguments -> Array
58 casper.emit('mouse.' + type, args); 58 casper.emit('mouse.' + type.replace('mouse', ''), args);
59 switch (args.length) { 59 switch (args.length) {
60 case 0: 60 case 0:
61 throw new Error('Too few arguments'); 61 throw new Error('Too few arguments');
......