Don't crash when importing a module that doesn't export

Instead of crashing, we should use the value "undefined". There's some question
as to whether we should default to the document, but we can resolve that later.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/690483002
This commit is contained in:
Adam Barth 2014-10-28 14:13:31 -07:00
parent 28626cf782
commit 4c5a9b1775
3 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1 @@
PASS

View File

@ -0,0 +1,9 @@
<html>
<link rel="import" href="resources/does-not-export.sky" as="hello" />
<link rel="import" href="../resources/dump-as-text.sky" />
<div id="result">FAIL - Script did not execute</div>
<script>
document.getElementById("result").textContent =
hello === undefined ? "PASS" : "FAIL";
</script>
</html>

View File

@ -0,0 +1 @@
This module has no exports.