MediaList
Return to: HTML DOM Level 2 index

List of associated media types in a stylesheet.

Platform Support

IE Mozilla Netscape Opera Safari Chrome
4.0+ 1.0+ 6.0+ 7.0+ 1.0+ no

Constructors

Constructor Action IE Mozilla Netscape Opera Safari Chrome
MediaList Constructor() : MediaList
List of associated media types in a stylesheet.
Show Details 4.0+ 1.0+ 6.0+ 7.0+ 1.0+ no

MediaList() : MediaList

List of associated media types in a stylesheet.

Returns
MediaList

Visibility
internal

Properties

Property Action IE Mozilla Netscape Opera Safari Chrome
length : Number
Number of media types in the list.
Show Details 4.0+ 1.0+ 6.0+ 7.0+ 1.0+ no
Availability

HTML DOM Level 2|W3C

mediaText : String
Text string containing the entire media type list.
Show Details 4.0+ 1.0+ 6.0+ 7.0+ 1.0+ no
Availability

HTML DOM Level 2|W3C

Functions

Method Action IE Mozilla Netscape Opera Safari Chrome
appendMedium(String newMedium) : void
Appends a new media type to the bottom of the list.
Show Details 4.0+ 1.0+ 6.0+ 7.0+ 1.0+ no

Parameters
String newMedium Medium to append.

Returns
void

Availability

HTML DOM Level 2|W3C

deleteMedium(String oldMedium) : void
Deletes the specified media type from the list.
Show Details 4.0+ 1.0+ 6.0+ 7.0+ 1.0+ no

Parameters
String oldMedium Medium to delete.

Returns
void

Availability

HTML DOM Level 2|W3C

item(Number index) : String
Returns the media type found at the specified position in the list.
Show Details 4.0+ 1.0+ 6.0+ 7.0+ 1.0+ no

Parameters
Number index Index position of the item to get.

Returns
String

For examples, see the quirksmode test page:

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

Availability

HTML DOM Level 2|W3C

Availability

HTML DOM Level 2|W3C

text_javascript aptana_docs