Firefox上的AngularDart失败,“receiver.webkitCreateShadowRoot未定义”

时间:2013-12-20 15:24:18

标签: angularjs dart angular-dart

我有一个AngularDart应用程序,可以使用Javascript在Chromium和Chrome上正常运行。但在Firefox和IE中,我收到以下错误:

[14:36:14.648] "NullError: receiver.webkitCreateShadowRoot is undefined

STACKTRACE:
.Element.createShadowRoot$0@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:84445
J.createShadowRoot$0$x@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:153659
._ComponentFactory.call$6@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:11337
.BlockFactory__instantiateDirectives__closure2.call$1@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:11097
.Primitives_applyFunction@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:5148
._FactoryProvider.get$2@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:125034
J.get$2$x@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:153716
.DynamicInjector__getInstanceBySymbol_closure.call$0@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:124806
._defaultCreationStrategy@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:125162
.Binding.creationStrategy$3@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:125271
.DynamicInjector._getInstanceBySymbol$2@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:124652
.DynamicInjector.get$1@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:124694
J.get$1$x@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:153713
.BlockFactory__instantiateDirectives_closure3.call$1@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:11183
.IterableMixinWorkaround_forEach@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:22126
.JSArray.forEach$1@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:1995
J.forEach$1$ax@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:153707
.BlockFactory._instantiateDirectives$5@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:10887
.BlockFactory._dom$_link$4@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:10816
.BlockFactory._dom$_link$4@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:10818
.BlockFactory._dom$_link$4@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:10818
.BlockFactory._dom$_link$4@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:10818
.BlockFactory.call$2@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:10776
.ngBootstrap_closure0.call$0@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:7661
._rootRun@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:27183
._ZoneDelegate.run$2@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:34652
.NgZone__onRun_closure.call$0@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:10306
.NgZone._onRunBase$4@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:10162
.NgZone._onRun$4@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:10181
$$.BoundClosure$4<.call$4@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:424
._ZoneDelegate.run$2@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:34652
._CustomizedZone.run$1@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:35046
.ngBootstrap@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:7485
.main@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:130170
._IsolateContext.eval$1@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:3635
.startRootIsolate@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:3301
@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:161315
@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:161295
@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:161309
@http://127.0.0.1:3030/foobarUI/web/foobarui.dart.js:9
"

这是我的foobarUI / pubspec.yaml:

name: foobarUI
description: A sample web application
dependencies:
  angular: 0.9.3
  browser: any
  json_object: any
  petitparser: any
  unittest: any
  foobar:
    path: ../foobarLib

我尝试添加js,shadow_dom和web_ui模块,但没有区别。

我试图添加“useShadowDom = true;” (和假)到主dart文件,没有区别。

从错误中可以看出,缺少对DOM shadow root的webkit支持,但为什么这个模块没有处理呢?

angular.dart.tutorial chapter_03示例发生同样的错误。这显然是Angular.Dart的一个问题。 Bug提交为:https://code.google.com/p/dart/issues/detail?id=15752

1 个答案:

答案 0 :(得分:1)

问题的Dart错误位于:https://code.google.com/p/dart/issues/detail?id=15144

已经修复了Dart bug还没有被推到AngularDart。该作品被https://github.com/angular/angular.dart/issues/366阻止。