Skip to content
This repository was archived by the owner on Jul 21, 2022. It is now read-only.
This repository was archived by the owner on Jul 21, 2022. It is now read-only.

Allow BOM before hashbang #14

Closed
@Eccenux

Description

@Eccenux

I think in the spec it should be explicitly said if BOM is allowed or not.

The readme says that hasbang should be "only at the start of a Source Text". As BOM (byte order mark in UTF-8) is allowed in JavaScript the actual script might start with something different (even if it appears to start with #).

Note that at the moment both Firefox 67 and Chrome 74 allow BOM before hashbang. Not sure if the browser actually gets the BOM from the server though. Tested with below micro scripts from Windows (file: protocol). In mentioned browsers it shows an alert message so BOM before hashbang is ignored.

shebang.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions