http://api.jquery.com/attribute-not-equal-selector/
Description: Select elements that either don't have the specified
attribute, or do have the specified attribute but not with a certain
value.
This selector is equivalent to :not([attr="value"]).
}
};
+ # '[attr!=bar]' - attributes doesn't match
+ /\G\[$sel_re!=$match_value_re\]/gc and
+ return do {
+ my $attribute = $1;
+ my $value = $2;
+ sub {
+ ! ($_[0]->{attrs}{$attribute}
+ && $_[0]->{attrs}{$attribute} eq $value);
+ }
+ };
+
# '[attr]' - match attribute being present:
/\G\[$sel_re\]/gc and
return do {
->to_html,
'<div frew="yo">grg</div>'.$stub,
'E[attr=val] works' );
-
+
+# el[attr!="foo"]
+is( HTML::Zoom->from_html('<div f="f"></div><div class="quux"></div>'.$stub)
+ ->select('div[class!="waargh"]')
+ ->replace_content('grg')
+ ->to_html,
+ '<div f="f">grg</div><div class="quux">grg</div>'.$stub,
+ 'E[attr!="val"] works' );
# el[attr*="foo"]
is( HTML::Zoom->from_html('<div f="frew goog"></div>'.$stub)