mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-22 12:03:25 -04:00
21 lines
618 B
TypeScript
21 lines
618 B
TypeScript
import { defineNuxtPlugin } from 'nuxt/app';
|
|
|
|
export default defineNuxtPlugin(() => {
|
|
if (!Object.prototype.hasOwnProperty.call(Object, 'hasOwn')) {
|
|
Object.defineProperty(Object, 'hasOwn', {
|
|
value: (object: object, property: PropertyKey) => {
|
|
return Object.prototype.hasOwnProperty.call(object, property);
|
|
},
|
|
});
|
|
}
|
|
if (!Object.hasOwn(window, 'BroadcastChannel')) {
|
|
Object.defineProperty(window, 'BroadcastChannel', {
|
|
value: class {
|
|
postMessage() {}
|
|
|
|
close() {}
|
|
},
|
|
});
|
|
}
|
|
});
|