解决浏览器端 globalThis is not defined 报错

解决浏览器端 globalThis is not defined 报错

前言

在使用低版本火狐浏览器出现报错globalThis is not defined

解决办法:

在vue的index.html 中添加 this.globalThis || (this.globalThis = this)

java 复制代码
<head>
    <script>
        this.globalThis || (this.globalThis = this)
    </script>
    ...
</head>
相关推荐
小堂子这厢有礼了18 小时前
Chet.QuartzNet.UI v2.3.0 大更新!表格重构 + 系统配置 + 分析页全面升级!
前端·后端·ui·重构·c#·vue
碎碎念_4921 天前
前后端分离项目开发规范
nginx·vue·springboot·restful
不能只会打代码2 天前
校享云 — 高校智慧后勤平台微服务架构设计与实践
spring cloud·docker·微服务·nacos·vue·校享云
是梦终空2 天前
计算机毕业设计279—基于SpringBoot+Vue3校园商户意见反馈系统(源代码+数据库+17000字论文+ppt)
数据库·spring boot·vue·毕业设计·课程设计·毕业论文·源代码
yyt3630458412 天前
KlineChartQuant Tooltip 高频交互 200FPS 性能优化完整复盘
前端·经验分享·性能优化·typescript·vue·交互·chrome devtools
这里是杨杨吖3 天前
SpringBoot+Vue心理健康咨询系统 附带详细运行指导视频
spring boot·vue·心理健康
seven_stars_4 天前
CVE-2018-19518PHP漏洞
linux·浏览器·kali
爱上纯净的蓝天5 天前
使用 AtomCode 构建微前端架构:从设计到实现实战
架构·vue·实战·react·微前端·atomcode
山海云端有限公司7 天前
随机诗词API实战:Vue项目接入完整示例与5个常见坑
vue·实战·前端开发·跨域·api调用·随机诗词api