CC: | Mike Sierra <sierra [...] ftrd.us> |
Subject: | feature request |
Date: | Thu, 29 Mar 2007 13:18:19 -0400 |
To: | bug-HTML-TreeBuilder-Select [...] rt.cpan.org |
From: | Mike Sierra <sierra [...] ftrd.us> |
It doesn't look like I sent this as an explicit request yet. A
useful feature would be to access elements not just by selector, but
by CSS property name or value. E.g, something like:
@elements = $tree->select_property( display => 'none' );
@elements = $tree->select_property( 'width' );
...maybe even:
%hash = $elements[0]->styles;
All that would require collating the contents of linked CSS, <style>
regions, and local <tag style="..."> calls. To get an idea of why
this feature might be useful, I plan to build on the server-side
uacss.pl script, using your module to trim out user-agent-specific
elements whose display is none, reducing the memory footprint for
mobile content. If you're *not* interested, let me know since I'll
probably be coding the routine anyway.
Excellent module, thanks, and just when I needed it!
--Mike Sierra, sierra@ftrd.us