Web::DOM::MediaList
The DOM MediaList
object
DESCRIPTION
The Web::DOM::MediaList
class implements the DOM MediaList
interface.
It represents a list of media queries.
METHODS
Following methods are available:
$media_list->append_medium ($string)
-
Append a media query to the list. [CSSOM]
$media_list->delete_medium ($string)
-
Delete a media query from the list. [CSSOM]
$string = $media_list->[$index]
$string = $media_list->item ($index)
-
Return the media query in the list, specified by its index. [CSSOM] [DOMPERL]
Use of the
item
method is discouraged as it doesn't support Perl-ish ways to access items, such as negative indexing, while$media_list->[-1]
works as intended. $number = @$media_list
$number = $media_list->length
-
Return the number of the media queries in the list. [CSSOM] [DOMPERL]
$string = $media_list->media_text
$string = '' . $media_list
$media_list->media_text ($string)
-
Return or set the list of media queries as a character string. [CSSOM] [DOMPERL]
$arrayref = $media_list->to_a
-
Return the new static array reference containing the media queries in the list. [DOMPERL]
($rule1, $rule2, ...) = $media_list->to_list
($rule1, $rule2, ...) = @$media_list
-
Return the list of the media queries contained in the list. [DOMPERL]
The object supports Perl standard read-only operations for array references,
e.g.
exists $media_list->[4]
. [DOMPERL]
SPECIFICATIONS
- CSSOM
-
CSSOM
<http://dev.w3.org/csswg/cssom/#medialist>
.The type of the
item
method isDOMString?
. - DOMPERL
-
manakai's DOM Perl Binding
<http://suika.suikawiki.org/~wakaba/wiki/sw/n/manakai%27s%20DOM%20Perl%20Binding#anchor-86>
.
DEPENDENCY
AUTHOR
Wakaba <wakaba@suikawiki.org>.
LICENSE
Copyright 2012-2013 Wakaba <wakaba@suikawiki.org>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.