dart2js - Uncaught TypeError: Cannot read property 'Event' of null - using Dev Channel build #17119
Labels
closed-obsolete
Closed as the reported issue is no longer relevant
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
web-dart2js
This issue was originally filed by cor...@gmail.com
What steps will reproduce the problem?
Given the following HTML:
<!doctype html>
<html lang="en">
<head>
<script type="application/dart" src="main.dart"></script>
<script type="text/javascript" src="dart.js"></script>
</head>
<body>
<div class="top-menu">
<!-- dynamic content here -->
</div>
</body>
</html>
Given the following Dart code:
import "dart:html";
void main() {
DivElement container = querySelector(".top-menu");
container.appendHtml("Test");
}
When compiling the Dart to JavaScript with the following command:
dart2js --enable-checked-mode --analyze-all --enable-diagnostic-colors -o main.dart.js main.dart
What is the expected output? What do you see instead?
When I visit the HTML page using regular Chrome I get the following error in the output:
Uncaught TypeError: Cannot read property 'Event' of null main.dart.js:8243
finishClass main.dart.js:8243
finishClass main.dart.js:8239
Isolate.$finishClasses main.dart.js:8271
(anonymous function) main.dart.js:7175
(anonymous function)
A very strange HTTP-request is also performed, where the URI includes the local path to my sdk. See screen shot.
What version of the product are you using? On what operating system?
Windows 8.1
Dart VM version: 1.2.0-dev.5.15 (Mon Feb 24 01:59:24 2014) on "windows_ia32"
Please provide any additional information below.
Live problem:
https://dl.dropboxusercontent.com/u/8183146/temp/dart/problem2_dev_channel/index.html
Attachment:
error1.png (17.70 KB)
The text was updated successfully, but these errors were encountered: