Skip to content

Commit

Permalink
HasClass fix
Browse files Browse the repository at this point in the history
  • Loading branch information
retrozoid committed Sep 20, 2024
1 parent 5530eb3 commit 0eb8b47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func (e Node) Log(msg string, args ...any) {
}

func (e Node) HasClass(class string) Optional[bool] {
return optional[bool](e.eval(`function(c){return this.classList.contains(c)}`))
return optional[bool](e.eval(`function(c){return this.classList.contains(c)}`, class))
}

func (e Node) MustHasClass(class string) bool {
Expand Down

0 comments on commit 0eb8b47

Please sign in to comment.