0

Full error: xengine.js:2 Uncaught SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

I have no framework. This is pure flat HTML, CSS and JavaScript.

HTML goes on like this (up to relevant moment):
http://pastebin.com/s8s2KLmt

And the JavaScript (starting from line 1, no additional files, entire xengine.js):
http://pastebin.com/TcZSPi9D

Sorry for not putting this into code tags. I have issue with copying with Ctrl+V and the pop-up doesn't support the pasting in right-click menu.

I have been Googling for answers, but they involved frameworks. I don't use any. This error occurs both on Opera and Chrome, and I think that it will occur in every other browser. Any idea on how solve this?

Have I just found a bug, or my environment is screwed up?

Edited by Aeonix

2
Contributors
1
Reply
9
Views
1 Year
Discussion Span
Last Post by minitauros
1

On the first line of your file with the error, type 'use strict' followed by a newline. That should fix it. Some stuff in Javascript is only supported if you use strict mode.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.