X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FHTML%2FZoom%2FFilterBuilder.pm;fp=lib%2FHTML%2FZoom%2FFilterBuilder.pm;h=5c79584e82a661690ce0a7bcafe0008df3bc727e;hb=5fa3d10f24e0a9aeaa77e5c7b1a22e6339959dd6;hp=74b7c145bb48633db2d95bd2f4c19e53769ac749;hpb=bce61371d913754688d91e7a325f45b7bc7e6f1e;p=catagits%2FHTML-Zoom.git diff --git a/lib/HTML/Zoom/FilterBuilder.pm b/lib/HTML/Zoom/FilterBuilder.pm index 74b7c14..5c79584 100644 --- a/lib/HTML/Zoom/FilterBuilder.pm +++ b/lib/HTML/Zoom/FilterBuilder.pm @@ -462,7 +462,6 @@ Sets an attribute of a given name to a given value for all matching selections. ->select('div') ->set_attribute({name=>'class', value=>'divider'}); - Overrides existing values, if such exist. When multiple L calls are made against the same or overlapping selection sets, the final call wins. @@ -472,19 +471,9 @@ call wins. Adds a value to an existing attribute, or creates one if the attribute does not yet exist. You may call this method with either an Array or HashRef of Args. -Here's the 'long form' HashRef: - $html_zoom ->select('p') - ->set_attribute(class=>'paragraph') - ->then - ->add_to_attribute({name=>'class', value=>'divider'}); - -And the exact same effect using the 'short form' Array: - - $html_zoom - ->select('p') - ->set_attribute(class=>'paragraph') + ->set_attribute({class => 'paragraph', name => 'test'}) ->then ->add_to_attribute(class=>'divider');