gpt4 book ai didi

firefox - Angular2 应用程序适用于 Chrome 和 IE,但不适用于 Firefox 或 Safari

转载 作者:太空狗 更新时间:2023-10-29 17:28:42 25 4
gpt4 key购买 nike

应用程序在 Chrome 和 IE(11) 中运行良好,但在 Firefox (42.0) 或 Safari (5.1.7) 中运行不佳。

火狐:

改变一个对象的 [[Prototype]] 会导致你的代码运行非常缓慢;而是使用 Object.create es6-shim.js:1338:11

创建具有正确初始 [[Prototype]] 值的对象

Angular 2 在开发模式下运行。调用 enableProdMode() 以启用生产模式。 angular2.dev.js:351:5

异常:错误:预期 int32 作为第二个参数 angular2.dev.js:23524

BrowserDomAdapter</BrowserDomAdapter.prototype.logError() angular2.dev.js:23514
BrowserDomAdapter</BrowserDomAdapter.prototype.logGroup() angular2.dev.js:23525
ExceptionHandler</ExceptionHandler.prototype.call() angular2.dev.js:1145
PlatformRef_</PlatformRef_.prototype._initApp/</<() angular2.dev.js:14801
NgZone</NgZone.prototype._notifyOnError() angular2.dev.js:5796
NgZone</NgZone.prototype._createInnerZone/errorHandling<.onError() angular2.dev.js:5700
run() angular2-polyfills.js:141

map@http://localhost:53861/lib/es6-shim/es6-shim.js:1113:14
TemplateParseVisitor</TemplateParseVisitor.prototype._createDirectiveAsts@http://localhost:53861/lib/anguar2/angular2.dev.js:24301:27
TemplateParseVisitor</TemplateParseVisitor.prototype.visitElement@http://localhost:53861/lib/anguar2/angular2.dev.js:24154:24
HtmlElementAst</HtmlElementAst.prototype.visit@http://localhost:53861/lib/anguar2/angular2.dev.js:20216:14
htmlVisitAll/<@http://localhost:53861/lib/anguar2/angular2.dev.js:20227:23
forEach@http://localhost:53861/lib/es6-shim/es6-shim.js:1107:14
htmlVisitAll@http://localhost:53861/lib/anguar2/angular2.dev.js:20226:5
TemplateParser</TemplateParser.prototype.parse@http://localhost:53861/lib/anguar2/angular2.dev.js:24038:20
TemplateCompiler</TemplateCompiler.prototype._compileComponentRuntime/done<@http://localhost:53861/lib/anguar2/angular2.dev.js:24669:32
run@http://localhost:53861/lib/anguar2/angular2-polyfills.js:138:14
NgZone</NgZone.prototype._createInnerZone/<.$run/<@[…]

Safari :

EXCEPTION: Error during instantiation of BrowserDetails! (Token Promise<ComponentRef> -> DynamicComponentLoader -> Compiler -> RuntimeCompiler -> ProtoViewFactory -> Renderer -> DomRenderer -> AnimationBuilder -> BrowserDetails).
angular2.dev.js:23514ORIGINAL EXCEPTION: TypeError: 'undefined' is not a function (evaluating 'window.requestAnimationFrame(callback)')

Potentially unhandled rejection [2] Error: EXCEPTION: Error during instantiation of BrowserDetails! (Token Promise<ComponentRef> -> DynamicComponentLoader -> Compiler -> RuntimeCompiler -> ProtoViewFactory -> Renderer -> DomRenderer -> AnimationBuilder -> BrowserDetails).
ORIGINAL EXCEPTION: TypeError: 'undefined' is not a function (evaluating 'window.requestAnimationFrame(callback)')
Error loading http://localhost:53861/app/bootDesktop.js


非常感谢任何关于错误的想法。看起来它与“BrowserDomAdapter”有关。

最佳答案

通过升级 es6-shim 解决了问题。

关于firefox - Angular2 应用程序适用于 Chrome 和 IE,但不适用于 Firefox 或 Safari,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34701144/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com