Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- Manifest: dom/base/test/jsmodules/chrome.toml
<!DOCTYPE html>
<meta charset=utf-8>
<title>Test error thrown when an import cannot be resolved</title>
<script>
var hadTypeError = false;
SimpleTest.waitForExplicitFinish();
window.onerror = handleError;
function handleError(message, url, line, column, error) {
hadTypeError = error instanceof TypeError;
}
function testError() {
ok(hadTypeError, 'Check that a TypeError was thrown');
SimpleTest.finish();
}
</script>
<script type="module" src="module_badImport.mjs"></script>
<body onload='testError()'></body>