Skip to content

LibJS: SyntaxError when using U+0E33 as an object property key #8870

@aplefull

Description

@aplefull

Summary

We get Unhandled JavaScript exception: [SyntaxError] Unexpected token Invalid. Expected property key when parser encounters in an object key. Noticed this when trying to run code with TinyLD library bundled in. It's a JS library for detecting the language of the text. Other browsers handle this code just fine.

Operating system

Linux

Steps to reproduce

N/A

Expected behavior

N/A

Actual behavior

N/A

URL for a reduced test case

https://codepen.io/aplefull/pen/vEXVwpy?editors=0012

HTML/SVG/etc. source for a reduced test case

<script>
  const a = {
    : 9,
  };
</script>

Log output and (if possible) backtrace

N/A

Screenshots or screen recordings

No response

Build flags or config settings

No response

Contribute a patch?

  • I’ll contribute a patch for this myself.

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