blazor webassembly在ios 12及以下版本打不开,调试报错:ReferenceError: Cant find variable: globalThis

调试看出在执行dotnet.6.0.0.fof53xxcmn.js时出现ReferenceError: Cant find variable: globalThis错误


加入下面代码即可

<script>
        !function(t){function e(){var e=this||self;e.globalThis=e,delete t.prototype._T_}"object"!=typeof globalThis&&(this?e():(t.defineProperty(t.prototype,"_T_",{configurable:!0,get:e}),_T_))}(Object);
</script>
posted @ 2021-12-23 17:06  Cody&  阅读(547)  评论(0编辑  收藏  举报