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

Unexpected token in Safari #1

Closed
jonathantneal opened this issue Nov 2, 2019 · 2 comments
Closed

Unexpected token in Safari #1

jonathantneal opened this issue Nov 2, 2019 · 2 comments

Comments

@jonathantneal
Copy link

Thanks for sharing your work! I’m excited to try it out. It may not be working as expected. I’ll look into why, but here are the details.

@jonathantneal
Copy link
Author

jonathantneal commented Nov 2, 2019

Upon further investigation, the issue I am experiencing in Safari is because instance field declarations are not yet supported in that browser.

This can be worked around by putting those declarations in the constructor with context; from:

export class WCMonacoEditor extends HTMLElement {
  __element = null;
  __editor = null;

To:

export class WCMonacoEditor extends HTMLElement {
  constructor () {
    super();
    this.__element = null;
    this.__editor = null;
  }

And it runs!

@evanplaice
Copy link
Member

evanplaice commented Nov 7, 2019

Thanks for taking the time to file this issue. Awesome quality bug report 👍

This should be fixed in the 1.0 release.

I'm going to close this issue for now. If you're still have issues after updating the package, don't hesitate to reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants