mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
30 lines
687 B
JavaScript
30 lines
687 B
JavaScript
"use strict";
|
|
|
|
(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;
|
|
})(); |