mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 17:35:16 +00:00
28 lines
672 B
JavaScript
28 lines
672 B
JavaScript
(function () {
|
|
if (typeof window !== 'object' || typeof window.CustomEvent === 'function') return;
|
|
|
|
var CustomEvent = function CustomEvent(event, params) {
|
|
params = params || {
|
|
bubbles: false,
|
|
cancelable: false,
|
|
detail: null
|
|
};
|
|
var evt = document.createEvent('CustomEvent');
|
|
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
|
|
return evt;
|
|
};
|
|
|
|
window.CustomEvent = CustomEvent;
|
|
})();
|
|
|
|
(function () {
|
|
if (typeof Object.values === 'function') return;
|
|
|
|
var values = function values(O) {
|
|
return Object.keys(O).map(function (key) {
|
|
return O[key];
|
|
});
|
|
};
|
|
|
|
Object.values = values;
|
|
})(); |