Skip to content

Conversation

Gazler
Copy link
Member

@Gazler Gazler commented Nov 15, 2024

No description provided.

@SteffenDE
Copy link
Collaborator

@Gazler I think we could also make this work instead of just documenting that it doesn't

> ```javascript
> hooks.MyHook = {
> updated: {
> if (this.el.getAttribute("data-hook-enabled") !== "false")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> if (this.el.getAttribute("data-hook-enabled") !== "false")) {
> if (this.el.dataset.hookEnabled !== "false") {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i prefer "data-hook-enabled" for the fact being is much easier to search for it globally. There is no benefit of one over the other.

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 this pull request may close these issues.

4 participants