Move exports from Document to Module

This CL moves the |exports| from Document to the new |Module| interface,
matching the spec. Also, the |module| object available to scripts is now really
an instance of |Module|.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/703593003
This commit is contained in:
Adam Barth 2014-11-10 15:34:25 -08:00
parent 04122dbd21
commit f860dc6a44
5 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,8 @@
<html>
<import src="../resources/dump-as-text.sky" />
<div id="result">FAIL</div>
<script>
document.getElementById("result").textContent =
module instanceof Application ? 'PASS': 'FAIL: ' + module;
</script>
</html>

View File

@ -0,0 +1 @@
PASS

View File

@ -0,0 +1,8 @@
<html>
<import src="../resources/dump-as-text.sky" />
<import src="resources/instance-of-module-module.sky" as="result" />
<div id="result">FAIL</div>
<script>
document.getElementById("result").textContent = result;
</script>
</html>

View File

@ -0,0 +1,3 @@
<script>
module.exports = module instanceof Module ? 'PASS' : 'FAIL: ' + module;
</script>