Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var getSharedEventEmitter = function getSharedEventEmitter() {
if (!eventEmitter) {
eventEmitter = new EventEmitter();
['mousemove', 'mouseup', 'touchmove', 'touchend', 'touchcancel'].forEach(function (name) {
return window.addEventListener(name, function (e) {
return eventEmitter.emit([name, e]);
}, { passive: false });
});
}
return eventEmitter;
};
function DragDropProviderCore() {
classCallCheck(this, DragDropProviderCore);
this.payload = null;
this.dragEmitter = new EventEmitter();
}