我遇到了这个错误,同时在移动浏览器中运行我的Polymer Element。在这种情况下Chrome。
DOMException {message: "Failed to execute 'dispatchEvent' on 'EventTarget': The event provided is null.", name: "InvalidStateError", code: 11, stack: "Error: Failed to execute 'dispatchEvent' on 'Event…/packages/shadow_dom/shadow_dom.debug.js:2678:12)",
INDEX_SIZE_ERR: 1…}
"Error: Failed to execute 'dispatchEvent' on 'EventTarget': The event provided is null.
at o.Map.Tap.o.Handler.extend._simulateEvent (http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js:9:5230)
at o.Map.Tap.o.Handler.extend._onUp (http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js:9:4807)
at Document.t.(anonymous function).s (http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js:8:20285)
at invoke (http://localhost:8080/packages/shadow_dom/shadow_dom.debug.js:2805:28)
at dispatchBubbling (http://localhost:8080/packages/shadow_dom/shadow_dom.debug.js:2753:12)
at dispatchEvent (http://localhost:8080/packages/shadow_dom/shadow_dom.debug.js:2706:9)
at HTMLDocument.dispatchOriginalEvent (http://localhost:8080/packages/shadow_dom/shadow_dom.debug.js:2678:12)" shadow_dom.debug.js:2816
当使用涉及使用
的Google地图或Leaflet地图时,它只会出现在移动浏览器中import 'dart:js';
库。有一个错误报告在https://code.google.com/p/dart/issues/detail?id=16125似乎是同一个问题,但没有回答如何处理它。
要查看同一问题是否影响了Leaflet,我还使用
实现了它'dart:js'
库,但得到同样的问题。
是否有解决方案/解决此问题?