MediaList : Object
Return to: HTML DOM Level 2 index

List of associated media types in a stylesheet.

Platform Support

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

Constructors

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

MediaList() : MediaList

List of associated media types in a stylesheet.

Returns
MediaList

Visibility
internal

Properties

Property Action IE Mozilla Netscape Opera Safari
length : Number
Number of media types in the list.
Show Details 4.0+ 1.0+ 6.0+ 7.0+ 1.0+
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+
Availability

HTML DOM Level 2|W3C

Functions

Method Action IE Mozilla Netscape Opera Safari
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+

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+

Parameters
String oldMedium Medium to delete.

Returns
void

Availability

HTML DOM Level 2|W3C

static 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+

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