-
Notifications
You must be signed in to change notification settings - Fork 791
Expand file tree
/
Copy pathMediaList.idl
More file actions
executable file
·70 lines (64 loc) · 3.1 KB
/
MediaList.idl
File metadata and controls
executable file
·70 lines (64 loc) · 3.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//
// All members defined since DOM-2 Style. The only differences are:
//
// 1. addition of stringifier qualifier on mediaText
// 2. addition of getter qualifier on item
// 3. removal of raises(DOMException) from {append,delete}Medium
//
[Documentation=
"<p>An object that implements the {@link} {@type} has an associated <dfn>collection of media queries</dfn>.</p>",
[ Documentation=
"<p>To <dfn id='create-a-medialist-object'>create a <code>MediaList</code> object</dfn> from a string <var>s</var>, run these steps:</p>\
<ol>\
<li><p>Create a new {@name} object.</p></li>\
<li><p>Set its <span title='dom-MediaList-mediaText'>mediaText</span> attribute to <var>s</var>.</p></li>\
<li><p>Return the newly created <code>{@name}</code> object.</p></li>\
</ol>"
]
Constructor
]
interface MediaList {
[Documentation=
"<p>The {@name} {@type} must return a <span title='serialize a media query list'>serialization</span>\
of the <span>collection of media queries</span>.</p>\
<p>Setting the {@name} {@type} must run these steps:\
<ol>\
<li><p>Empty the <span>collection of media queries</span>.</p></li>\
<li><p>If the given value is the empty string terminate these steps.</p></li>\
<li><p>Append all the media queries as a result of <span title='parse a media query list'>parsing</span> the given\
value to the <span>collection of media queries</span>.</p></li>\
</ol>"
]
stringifier attribute DOMString mediaText;
[Documentation=
"<p>The {@name} {@type} must return the number of media queries in the <span>collection of media queries</span>.</p>"
]
readonly attribute unsigned long length;
[Documentation=
"<p>The {@name} method must return the media query in the <span>collection of media queries</span> given by\
<var>index</var>, or null, if <var>index</var> is greater than or equal to the number of media queries in the\
<span>collection of media queries</span>.</p>"
]
getter DOMString item(unsigned long index);
[Documentation=
"<p>The {@name} method must run these steps:</p>\
<ol>\
<li><p>Let <var>m</var> be the result of <span title='parse a media query'>parsing</span> the given value.</p></li>\
<li><p>If <var>m</var> is null terminate these steps.</p></li>\
<li><p>If <span title='compare media queries'>comparing</span> <var>m</var> with any of the media queries in the\
<span>collection of media queries</span> returns true terminate these steps.</p></li>\
<li><p>Append <var>m</var> to the <span>collection of media queries</span>.</p></li>\
</ol>"
]
void appendMedium(DOMString medium);
[Documentation=
"<p>The {@name} method must run these steps:</p>\
<ol>\
<li><p>Let <var>m</var> be the result of <span title='parse a media query'>parsing</span> the given value.</p></li>\
<li><p>If <var>m</var> is null terminate these steps.</p></li>\
<li><p>Remove any media query from the <span>collection of media queries</span> for which\
<span title='compare media queries'>comparing</span> the media query with <var>m</var> returns true.</p></li>\
</ol>"
]
void deleteMedium(DOMString medium);
};