bpmn-js/test/util/KeyEvents.js
Nico Rehwaldt 92aac008b8 chore(ci): use latest node for testing
This ensures we run against npm v5:

* bump wiredeps dependency version
* rebuild .wiredeps
* internalize test helpers from diagram-js
2017-10-11 15:19:36 +02:00

14 lines
285 B
JavaScript

'use strict';
function createKeyEvent(element, code, ctrlKey) {
var e = document.createEvent('Events') || new document.defaultView.CustomEvent('keyEvent');
e.keyCode = code;
e.which = code;
e.ctrlKey = ctrlKey;
return e;
}
module.exports.createKeyEvent = createKeyEvent;