CSS::DOM::MediaList - Medium list class for CSS::DOM
Version 0.17
use CSS::DOM; $media_list = new CSS::DOM ->media; use CSS::DOM::MediaList; $media_list = new MediaList 'screen', 'papyrus'; @media = @$media_list; # use as array $media_list->mediaText; # returns a string $media_list->mediaText('print, screen'); # change it $media_list->deleteMedium('print'); $media_list->appendMedium('tv');
This module implements medium lists for CSS::DOM. It implements the CSSMediaList DOM interface and inherits from CSS::DOM::Array.
A comma-and-space-separated string of the individual media in the list, e.g., 'screen, print'.
Deletes the named medium from the list, or throws an error if it cannot be found.
Adds a medium to the end of the list.
CSS::DOM
CSS::DOM::Array
To install CSS::DOM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CSS::DOM
CPAN shell
perl -MCPAN -e shell install CSS::DOM
For more information on module installation, please visit the detailed CPAN module installation guide.