Implement dynamic-import for WebCore
[WebKit-https.git] / LayoutTests / js / dom / modules / nomodule-has-no-effect-on-module-inline.html
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script src="../../../resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <script>
8 description('Test nomodule does not have any effect on module script.');
9
10 // Module will be executed asynchronously.
11 window.jsTestIsAsync = true;
12 </script>
13 <script>
14 debug('Module is not executed yet.');
15 </script>
16 <script src="../../../resources/js-test-post.js"></script>
17 <script nomodule type="module">
18 import Cocoa from "./resources/module-inline-simple.js";
19 var cocoa = new Cocoa();
20
21 debug("Module execution is confined in the module environment.");
22 shouldBeEqualToString("typeof cocoa", "undefined");
23
24 window.exportedCocoa = cocoa;
25 shouldBeEqualToString("typeof exportedCocoa", "object");
26 shouldBeEqualToString("exportedCocoa.taste()", "awesome");
27 finishJSTest();
28 </script>
29 </body>
30 </html>