News for hackers. Stuff that matters.
Re:JavaScript Modules by ripter on Wednesday July 02, 2014 @12:40PM (#7977975)
script supports a new type, module.

    <script type="module">
        // loads the 'q' export from 'mymodule.js' in the same path as the page
        import { q } from 'mymodule';

        new q(); // -> 'this is an es6 class!'
    </script>
You can use it today with things like : https://github.com/ModuleLoader/es6-module-loader

There are no comments on this comment yet.