mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
19 lines
387 B
JavaScript
19 lines
387 B
JavaScript
if (typeof CustomEvent === 'undefined') {
|
|
CustomEvent = function () {
|
|
|
|
}
|
|
}
|
|
|
|
if (typeof Set == 'undefined') {
|
|
// very simple polyfill
|
|
Set = function () {
|
|
this.values = [];
|
|
};
|
|
Set.prototype.has = function (value) {
|
|
return this.values.indexOf(value) !== -1;
|
|
};
|
|
Set.prototype.add = function (value) {
|
|
this.values.push(value);
|
|
};
|
|
}
|