Caridy Patino (2014-12-21T02:21:34.000Z)
d at domenic.me (2015-01-05T21:10:27.626Z)
The problem is that those inline modules might import other modules, e.g.: ```html <script type="module"> import foo from "./foo.js"; window.sequence = 10; console.log(window.sequence); </script> <script type="module"> console.log(" should be 11: " + ++window.sequence); </script> ``` IMO they should be async (implicit and not configurable) and if the order should be preserved then we can explore the `defer` attribute, saying: ```html <script type="module" defer> import foo from "./foo.js"; window.sequence = 10; console.log(window.sequence); </script> <script type="module" defer> console.log(" should be 11: " + ++window.sequence); </script> ``` Although, I consider this an edge case, and in the majority of cases we will simply use modules that does not rely on any other online module in the page that defines global values, and if they have to share functionality, they can simply rely on a module, saying: ```html <script type="module"> import {sequence} from "./mod.js"; console.log(sequence); </script> <script type="module"> import {sequence, increment} from "./mod.js"; increment(); console.log(" should be 11: " + sequence); </script> ``` According to the current algorism in the specs, this should work just fine with the right sequence of execution.