jashkenas/coffeescript

Legacy browser compiler does not compile

scanline opened this issue · 1 comments

After digging through the source of CoffeeScript's online playground at https://coffeescript.org/#try
I realized it does nothing more than:

If I try to replicate this in it's most simplest form e.g.

<!DOCTYPE html>
<html lang="en">
<head>
	<script src="https://coffeescript.org/browser-compiler-legacy/coffeescript.js"></script>
	<script type="text/javascript">
		let coffee = "alert 'Hello CoffeeScript!'"
		let js = CoffeeScript.compile(coffee, {
			bare: !0,
			inlineMap: !0
		});
	</script>
</head>
</html>

I just get an error in the console saying:
Uncaught TypeError: child.updateLocationDataIfMissing is not a function

I can’t reproduce your error.

Note that your code doesn’t do anything. If you want the compiled CoffeeScript to run, add eval(js) or use CoffeeScript.run.