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

Issues with 'remove' command example and causes internal error #509

Open
MeemeeLab opened this issue Jan 17, 2024 · 0 comments
Open

Issues with 'remove' command example and causes internal error #509

MeemeeLab opened this issue Jan 17, 2024 · 0 comments

Comments

@MeemeeLab
Copy link

In the documentation of the remove command (https://hyperscript.org/commands/remove/), there is an example:

<button _="on click remove [disabled]">Un-Disable Me!</button>

I belive there is multiple errors in this example and does not work, because:
A. Correct expression for attribute is @disabled, not [disabled]
B. Disabled button does not fire on click
C. Button is not disabled in first place!

Another issue arises when using from along with this incorrect square bracket attribute expression (e.g., on click remove [disabled] from #box). It fails to execute with the error that is probably should not happen: Cannot read properties of undefined (reading 'parentElement')

I'm a bit of a noob at hyperscript, so I apologize if I've missed something.

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

No branches or pull requests

1 participant