Skip to content

Instantly share code, notes, and snippets.

@bananu7
Created May 19, 2014 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bananu7/5b5f9e010c158f3c5e32 to your computer and use it in GitHub Desktop.
Save bananu7/5b5f9e010c158f3c5e32 to your computer and use it in GitHub Desktop.
SSCCE for Florian
System.import("q").then(function(m) { console.log(m); }).catch(function(e) { console.log(e); })
//> TypeError {stack: (...), message: "Evaluating q↵ Cannot read property 'lineNumberTable' of undefined"}
export class q {
constructor() {
console.log('this is an es6 class!');
}
}
<!doctype html>
<html>
<head>
<title>ES6 loader test</title>
</head>
<body>
<script src="lib/traceur.js" type="text/javascript"></script>
<script src="lib/es6-module-loader.js"></script>
<script>
traceur.options.experimental = true;
</script>
<!-- gives Assertion failed: Non-empty source; evaluationg anon1 -->
<!--script type="module" src="q.js"></!--script-->
<!-- not recognized -->
<module src="q.js"></module>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment