VERSION

Version 0.15

SYNOPSIS

  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');

DESCRIPTION

This module implements medium lists for \s-1CSS::DOM\s0. It implements the CSSMediaList \s-1DOM\s0 interface and inherits from CSS::DOM::Array.

METHODS

\s-1DOM\s0 Attributes

mediaText

A comma-and-space-separated string of the individual media in the list, e.g., 'screen, print'.

\s-1DOM\s0 Methods

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.

RELATED TO CSS::DOM::MediaList…

\s-1CSS::DOM\s0

CSS::DOM::Array