in src/attachHandlers.js [88:113]
export function defineCustomDetails(options, type) {
// Events list
// Keys are event types
// Values are functions that return details object if applicable
const eventType = {
'click' : extractMouseEvent,
'dblclick' : extractMouseEvent,
'mousedown' : extractMouseEvent,
'mouseup' : extractMouseEvent,
'focus' : null,
'blur' : null,
'input' : options.logDetails ? function(e) { return { 'value' : e.target.value }; } : null,
'change' : options.logDetails ? function(e) { return { 'value' : e.target.value }; } : null,
'dragstart' : null,
'dragend' : null,
'drag' : null,
'drop' : null,
'keydown' : options.logDetails ? function(e) { return { 'key' : e.keyCode, 'ctrl' : e.ctrlKey, 'alt' : e.altKey, 'shift' : e.shiftKey, 'meta' : e.metaKey }; } : null,
'mouseover' : null,
'wheel' : function(e) { return { 'x' : e.deltaX, 'y' : e.deltaY, 'z' : e.deltaZ }; },
'scroll' : function() { return { 'x' : window.scrollX, 'y' : window.scrollY }; },
'resize' : function() { return { 'width' : window.outerWidth, 'height' : window.outerHeight }; },
'submit' : null
};
return eventType[type];
}