Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the library support JavaScript strict mode #81

Open
kingo55 opened this issue Jun 11, 2020 · 1 comment
Open

Make the library support JavaScript strict mode #81

kingo55 opened this issue Jun 11, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@kingo55
Copy link
Member

kingo55 commented Jun 11, 2020

If we're to include the Mojito lib inside anywhere that uses the strict interpreter, I think it will fail to run. Adding 'use strict'; to the top of the lib prevents us from even reaching the first test because we omit the "var" declaration for Mojito. Even after adding the var declaration to Mojito, the first test fails, so there's likely a bunch of changes we need to make here.

Judging from MDN's docs, we shouldn't just switch willy-nilly to strict mode because some browsers interpret strict mode differently to one another. Instead, just passing the tests should be enough.

Despite us not needing strict mode so far, if we at least support it, we'll ensure Mojito can run in as many places as possible.

@kingo55 kingo55 added the bug Something isn't working label Jun 11, 2020
@allmywant
Copy link
Member

@kingo55
I agree with you, we should support it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants