Add LINK_CLICK action

Change-Id: I2f3b5d51a68e4830abaf7f2dcd5d9ae0eb60d1e7
This commit is contained in:
Sam Smith 2016-11-10 12:05:38 +00:00
parent 9611d3b2db
commit 4324200e01
2 changed files with 18 additions and 0 deletions

View file

@ -41,6 +41,20 @@
};
};
/**
* Represents the user clicking on a link with their mouse, keyboard, or an
* assistive device.
*
* @param {jQuery} $el
* @return {Object}
*/
actions.linkClick = function ( $el ) {
return {
type: 'LINK_CLICK',
el: $el
};
};
/**
* Creates an object whose methods encapsulate all actions that can be
* dispatched to the given

View file

@ -69,7 +69,11 @@
} )
.on( 'mouseout blur', function () {
actions.linkAbandon( this );
} )
.on( 'click', function () {
actions.linkClick( this );
} );
} );
} );