MediaList : Object

List of associated media types in a stylesheet.

Browser/User Agent Support

IEMozillaNetscapeOperaSafariNetscapte
4.0+1.0+6.0+7.0+1.0+no

Constructors

ConstructorIEMozillaNetscapeOperaSafariNetscapte
List of associated media types in a stylesheet.
4.0+1.0+6.0+7.0+1.0+no
 

Properties

PropertyIEMozillaNetscapeOperaSafariNetscapte
Number of media types in the list.
4.0+1.0+6.0+7.0+1.0+no
 
Text string containing the entire media type list.
4.0+1.0+6.0+7.0+1.0+no
 

Methods

MethodIEMozillaNetscapeOperaSafariNetscapte
Appends a new media type to the bottom of the list.
4.0+1.0+6.0+7.0+1.0+no
 
Deletes the specified media type from the list.
4.0+1.0+6.0+7.0+1.0+no
 
Returns the media type found at the specified position in the list.
4.0+1.0+6.0+7.0+1.0+no
 

Availability

HTML DOM Level 2 | W3C

Constructor Detail

MediaList MediaList()

List of associated media types in a stylesheet.

Visibility
internal

Property Detail

Number length - read only

Number of media types in the list.

Availability

HTML DOM Level 2 | W3C

String mediaText

Text string containing the entire media type list.

Availability

HTML DOM Level 2 | W3C

Method Detail

appendMedium(String newMedium) : void

Appends a new media type to the bottom of the list.

StringnewMediumMedium to append.

Availability

HTML DOM Level 2 | W3C

deleteMedium(String oldMedium) : void

Deletes the specified media type from the list.

StringoldMediumMedium to delete.

Availability

HTML DOM Level 2 | W3C

item(Number index) : static String

Returns the media type found at the specified position in the list.

NumberindexIndex position of the item to get.

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/item.html

Availability

HTML DOM Level 2 | W3C