Introduced in: | DOM 2 Core |
The MediaList interface provides the abstraction of an ordered collection of media, without
defining or constraining how this collection is implemented. An empty list is the same as
a list that contains the medium "all".
The items in the MediaList are accessible via an integral index, starting from 0.
length:Number
[read-only]
Introduced in: | DOM 2 Core |
The number of media in the list. The range of valid media is 0 to length-1 inclusive.
Implementation public function get length():Number
See also
mediaText:DOMString
[read-only]
Introduced in: | DOM 2 Core |
The parsable textual representation of the media list. This is a comma-separated list of media.
Implementation public function get mediaText():DOMString
Throws | DOMException — SYNTAX_ERR: Raised if the specified string value has a syntax error and is unparsable.
|
|
| DOMException — NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly.
|
See also
public function appendMedium(newMedium:DOMString):void
Introduced in: | DOM 2 Core |
Adds the medium newMedium to the end of the list. If the newMedium is already used, it is first removed.
Parameters
Throws | DOMException — INVALID_CHARACTER_ERR: If the medium contains characters that are
invalid in the underlying style language.
|
|
| DOMException — NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly.
|
See also
public function deleteMedium(oldMedium:DOMString):void
Introduced in: | DOM 2 Core |
Deletes the medium indicated by oldMedium from the list.
Parameters
| oldMedium:DOMString — The medium to delete in the media list.
|
Throws | DOMException — NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly.
|
|
| DOMException — NOT_FOUND_ERR: Raised if oldMedium is not in the list.
|
See also
Mon Aug 17 2009, 10:08 AM -04:00