diff --git a/node.go b/node.go index ccce1fa..803cd7d 100644 --- a/node.go +++ b/node.go @@ -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 {