Skip to content

Make the library support JavaScript strict mode #81

@kingo55

Description

@kingo55

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions