dom-mousemove-dispatcher
Version:
Fire a mousemove on the DOM
28 lines (25 loc) • 768 B
JavaScript
let objectCreate;
if (typeof Object.create != 'function') {
objectCreate = (function(undefined) {
var Temp = function() {};
return function (prototype, propertiesObject) {
if(prototype !== Object(prototype) && prototype !== null) {
throw TypeError('Argument must be an object, or null');
}
Temp.prototype = prototype || {};
var result = new Temp();
Temp.prototype = null;
if (propertiesObject !== undefined) {
Object.defineProperties(result, propertiesObject);
}
// to imitate the case of Object.create(null)
if(prototype === null) {
result.__proto__ = null;
}
return result;
};
})();
}else{
objectCreate = Object.create;
}
export default objectCreate;