traceur on-the-fly results in error (ReferenceError: webLoader is not defined)

134 views
Skip to first unread message

Karthik Bose

unread,
Apr 23, 2015, 11:13:59 AM4/23/15
to traceur-comp...@googlegroups.com
Hi,
  I'm trying to transpile the JS file on-the-fly. But it results in  (ReferenceError: webLoader is not defined)

Here is my html code.
<!DOCTYPE html>
<html>
<head>
<title>Testing ES6</title>
<script>
$traceurRuntime.options = traceur.util.Options.experimental();
</script>
<script type="module" src="JSToday.js"></script> 
</head>
<body>
Experimenting ES6 features!!!
</body>
</html>


Javascript file "JSToday.js" 
// Starts Here --
async function myGen()
{
console.log("myGen started!");
await timeout(2000);
console.log("myGen completed after 2000 ms!");
}

function timeout(ms) {
return new Promise((resolve) => {
setTimeout(resolve, ms);
});
}

(function Body_OnLoad() {
  myGen();
})();
// Ends Here --


Error in Console:
traceur.js:31136 Uncaught ReferenceError: webLoader is not defined


Note:
 If I move the content of JSToday.js file into a script tag in the html file, then it works fine.

Thanks,
Karthik
.



.

John J Barton

unread,
Apr 23, 2015, 12:40:35 PM4/23/15
to traceur-comp...@googlegroups.com
Thanks, we also have issue https://github.com/google/traceur-compiler/issues/1898#issuecomment-95618725
I'll fix it, today I hope.

--
You received this message because you are subscribed to the Google Groups "traceur-compiler-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to traceur-compiler-d...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

John J Barton

unread,
Apr 24, 2015, 11:40:06 AM4/24/15
to traceur-comp...@googlegroups.com
This should be fixed and I published a new version.
jjb
Reply all
Reply to author
Forward
0 new messages