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

Inline event handlers in markup cause errors when used without quotes #28

Closed
alexprey opened this issue Aug 19, 2020 · 3 comments
Closed
Assignees
Labels
bug Something isn't working ExternalDep Issue related with external dependency issue or smth like this Svelte V3 Issue related to Svelte V3 components

Comments

@alexprey
Copy link
Collaborator

alexprey commented Aug 19, 2020

The following markup cause exception while parsing component

<button on:click={() => dispatch('notify2')}>
    CLICK!
</button>

<button on:click={function () { dispatch('notify2'); }}>
    CLICK!
</button>
@alexprey alexprey added bug Something isn't working Svelte V3 Issue related to Svelte V3 components labels Aug 19, 2020
@alexprey alexprey self-assigned this Aug 19, 2020
@alexprey
Copy link
Collaborator Author

The cause of this issue is a not supported HTML format for statements like following:

<tag attribute={() => { some another actions that mighty can be helpfully; } />

@alexprey alexprey added the ExternalDep Issue related with external dependency issue or smth like this label Aug 20, 2020
@alexprey
Copy link
Collaborator Author

Actually the issue caused in base library that used for HTML parsing, so I'm create a PR in fork version of htmlparser2 package that still in progress alexprey/htmlparser2#1

alexprey added a commit that referenced this issue Aug 25, 2020
@alexprey
Copy link
Collaborator Author

Fixed and published with new package of version 3.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ExternalDep Issue related with external dependency issue or smth like this Svelte V3 Issue related to Svelte V3 components
Projects
None yet
Development

No branches or pull requests

1 participant