1

Javascript を使用して Chromium と Chrome で正常に動作する AngularDart アプリケーションがあります。しかし、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;」を追加してみました (およびfalse)メインのdartファイルに、違いはありません。

エラーから、DOM シャドウ ルートの Webkit サポートが欠落していることは明らかですが、なぜこのモジュールはこれを処理しないのですか?

angular.dart.tutorial chapter_03 サンプルでも同じエラーが発生します。これは明らかに Angular.Dart の問題です。次のように報告されたバグ: https://code.google.com/p/dart/issues/detail?id=15752

4

1 に答える 1

1

問題の Dart バグは次のとおりです: https://code.google.com/p/dart/issues/detail?id=15144

AngularDart にまだプッシュされていない Dart バグで修正されました。その作業はhttps://github.com/angular/angular.dart/issues/366によってブロックされてい ます。

于 2013-12-20T17:58:58.357 に答える