-
Notifications
You must be signed in to change notification settings - Fork 72
/
index.html
470 lines (424 loc) · 17.8 KB
/
index.html
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="light dark">
<title>Mozilla Standards Positions</title>
<link rel="preload" as="image" href="asset/Mozilla-2024.svg">
<link rel="preload" as="image" href="asset/WHATWG.svg">
<link rel="preload" as="image" href="asset/W3C.svg">
<link rel="preload" as="image" href="asset/W3C-CG.svg">
<link rel="preload" as="image" href="asset/IETF.svg">
<link rel="preload" as="image" href="asset/Ecma.png">
<link rel="preload" as="image" href="asset/Unicode.svg">
<link rel="preload" as="image" href="asset/Proposal.svg">
<link rel="preload" as="image" href="asset/Other.svg">
<link rel="preload" as="image" href="asset/bugzilla.png">
<link rel="preload" as="image" href="asset/MDN.svg">
<link rel="icon" href="asset/mozilla-icon.png">
<style>
/* light scheme colors */
:root {
--root-color: #333;
--root-bg-color: #fff;
--header-bg-color: #eee;
--h1-color: black;
--highlight-bg-color: #ffffd7;
--highlight-color: inherit;
--link-color: #2268a4;
--row-hover-bg-color: #f5f5f5;
--positive-color: white;
--positive-bg-color: green;
--negative-color: white;
--negative-bg-color: maroon;
--neutral-color: inherit;
--neutral-bg-color: transparent;
--defer-color: white;
--defer-bg-color: #666;
--table-border-color: silver;
--position-border-color: gray;
--input-bg-color: white;
--input-color: black;
/* under consideration uses the same colors as defer */
}
/* dark scheme colors */
@media (prefers-color-scheme: dark) {
:root {
--root-color: #eee;
--root-bg-color: #222;
--header-bg-color: black;
--highlight-bg-color: #440;
--h1-color: white;
--link-color: #6fb6f5;
--row-hover-bg-color: black;
--table-border-color: #444;
--position-border-color: black;
--positive-bg-color: #00a000;
--positive-color: black;
--negative-bg-color: #c65050;
--negative-color: black;
--defer-bg-color: #999;
--defer-color: black;
--input-bg-color: #171717;
--input-color: white;
}
h1 img { filter: invert(1); }
table img { background-color: white; border-radius: 16px; }
}
html { font-family: system-ui, sans-serif; color: var(--root-color); background-color: var(--root-bg-color); line-height: 1.5; scrollbar-gutter: stable; scroll-padding-top: calc(2.5em + 1px); }
html.loading header ~ * { visibility: hidden; }
body { margin: 2em; }
header { background-color: var(--header-bg-color); margin: 0 auto 2em; padding: 3em; max-width: 66em; }
h1 { font-size: min(12vw, 4em); margin: 0; color: var(--h1-color); line-height: 1; }
h1 img { max-height: 0.83333333em; width: auto; }
mark { background-color: var(--highlight-bg-color); color: var(--highlight-color); padding: 0.5em; margin: -0.5em; line-height: 2; box-decoration-break: clone; }
:any-link { color: var(--link-color); padding: 0.25rem 0; }
table :any-link { text-decoration: none; }
table :any-link:hover { text-decoration: underline; }
search { margin: 0 auto 2em; padding-block: 3em; padding-inline: min(3%, 3em); max-width: 66em; }
search label { display: flex; gap: 1em; }
input[name="search"] { width: 100%; margin-right: min(5%, 5em); border: 1px solid gray; border-radius: 3px; background-color: var(--input-bg-color); color: var(--input-color); }
table { border-collapse: collapse; table-layout: fixed; width: 100%; margin: 0 auto 2em; max-width: 72em; min-width: 48em; }
thead { position: sticky; top: 0; background-color: var(--root-bg-color); z-index: 2; }
th { text-align: left; box-shadow: var(--table-border-color) 0 1px 0; white-space: nowrap; }
td.specification { word-wrap: break-word; }
td.concerns, td.topics { font-size: 0.75em; padding-bottom: 0.85em; text-wrap: balance; }
td.venues, td.more-info { word-spacing: 8px; padding-top: 0.1em; padding-bottom: 0.1em; font-size: 1.5em; }
td.more-info :any-link[title="Discussion"] { font-size: 0.75rem; vertical-align: 0.2rem; }
td.more-info :any-link:not([title="Discussion"]) { padding: 0; text-decoration: none; }
td.link :any-link { padding: 0.25rem; }
th.concerns { width: 7em; }
th.position { width: 4em; }
th.topics { width: 3.5em; }
th.venues { width: 3.5em; }
th.more-info { width: 9.5em; }
th, td { padding: 0.5rem; }
th.link { width: 3em; text-align: center; }
td.link { padding-left: 2.5em; }
tr.details > td { padding-top: 0; padding-bottom: 0; border-top: none; }
summary { position: relative; white-space: pre; top: calc(-2em - 1px); width: 0.9em; padding-left: 0.45em; overflow: hidden; cursor: default; user-select: none; }
details:not([open]) { height: 0; }
details dl { margin-top: -1em; grid-template-columns: 6em auto; }
details dt { font-weight: bold; }
dl { display: grid; grid-template-columns: max-content auto; row-gap: 1em; max-width: calc(100vw - 4em) }
dt { text-align: right; }
dd { margin-left: 1em; padding-left: 1px; }
td { border-top: 1px solid var(--table-border-color); vertical-align: bottom; }
tbody > tr:hover,
tbody > tr:hover + tr.details,
tbody > tr:has( + :where(tr.details:hover)) { background-color: var(--row-hover-bg-color); }
tbody > tr:target,
tbody > tr:target + tr.details { background-color: var(--highlight-bg-color); color: var(--highlight-color); }
table img { width: auto; height: 24px; vertical-align: -2px; }
span.position { border-radius: 0.6em; padding: 0.25em 0.5em; vertical-align: 1px; font-size: 0.75em; border: 1px solid var(--position-border-color); white-space: nowrap; }
span.positive { background-color: var(--positive-bg-color); color: var(--positive-color); }
span.negative { background-color: var(--negative-bg-color); color: var(--negative-color); }
span.neutral { border-color: currentColor; }
span.defer, span.under-consideration { background-color: var(--defer-bg-color); color: var(--defer-color); }
</style>
<script>
// Avoid a flash of empty table (FOET)
document.documentElement.classList.add('loading');
setTimeout(() => {
document.documentElement.classList.remove('loading');
}, 1000);
</script>
<meta name="description" content="This page tracks Mozilla's positions on open Web and Web-related specifications submitted to standards bodies like the IETF, W3C, WHATWG, and Ecma TC39.">
</head>
<body>
<header>
<h1><img src="asset/Mozilla-2024.svg" alt="Mozilla" width="240" height="50"> Standards Positions</h1>
<p>This page tracks Mozilla's positions on open Web and Web-related specifications submitted to standards
bodies like the <a href="https://www.ietf.org/">IETF</a>, <a href="https://www.w3.org/">W3C</a>,
<a href="https://whatwg.org/">WHATWG</a>, and <a href="https://tc39.github.io/">Ecma TC39</a>.</p>
<p>Please remember, this isn't a commitment to implement or participate;
<strong>it's just what we think right now</strong>. See <a
href="https://groups.google.com/a/mozilla.org/g/dev-platform/">dev-platform</a>
to find out what we're implementing.</p>
<p><mark>Want Mozilla's position on a specification? <a href="https://github.com/mozilla/standards-positions/">Find out more</a>.</mark></p>
</header>
<p class="noscript">Enable JavaScript to view the Mozilla standards positions, or see the <a href="https://github.com/mozilla/standards-positions/issues?q=is%3Aissue">issues in mozilla/standards-positions</a> on GitHub.</p>
<search>
<p><label>Search <input name="search"></label></p>
</search>
<table>
<thead>
<tr>
<th class="link">Link</th>
<th class="specification">Specification</th>
<th class="position">Position</th>
<th class="concerns">Concerns</th>
<th class="topics">Topics</th>
<th class="venues">Venues</th>
<th class="more-info">More info</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<h2>Legend</h2>
<p>The possible positions are:</p>
<dl>
<dt><span class="position positive">positive</span></dt><dd>Mozilla regards this work as a potential improvement to the web.</dd>
<dt><span class="position neutral">neutral</span></dt><dd>Mozilla is not convinced of the merits of this work, but does not see any significant negative potential.</dd>
<dt><span class="position negative">negative</span></dt><dd>Mozilla believes that pursuing this work in its current form would not be good for the web.</dd>
<dt><span class="position defer">defer</span></dt><dd>Mozilla takes no position on this work.</dd>
<dt><span class="position under-consideration">under consideration</span></dt><dd>Mozilla has not taken a position on this work and is gathering more information.</dd>
</dl>
<script>
function getData() {
// We need to delay the load event for URL fragments and text fragments to work reliably,
// so use <iframe> instead of fetch().
const iframe = document.createElement('iframe');
iframe.hidden = true;
iframe.src = "merged-data.json";
const p = new Promise(resolve => {
iframe.onload = e => {
const text = iframe.contentDocument.body.textContent;
const data = JSON.parse(text);
iframe.remove();
resolve(data);
};
});
document.body.append(iframe);
return p;
}
function sanitizeHTML(value) {
// Only support links and code.
const template = document.createElement('template');
const div = template.content.ownerDocument.createElement('div');
template.content.append(div); // force parser context to "in body"
div.innerHTML = value;
const iterator = document.createNodeIterator(div);
let node = iterator.nextNode(); // This is the div
while (node = iterator.nextNode()) {
if (node.nodeType === Node.TEXT_NODE) {
continue;
}
if (node.nodeType === Node.ELEMENT_NODE) {
if (node instanceof HTMLAnchorElement) {
if (node.attributes.length === 1 && node.hasAttribute('href')) {
const href = node.getAttribute('href');
if (href[0] === '#' || href.startsWith("https://")) {
continue;
}
}
} else if (node instanceof HTMLElement && node.localName === "code") {
if (node.attributes.length === 0) {
continue;
}
}
}
console.error("HTML Sanitization failed.", value);
return [value];
}
return div.childNodes;
}
function cell(nodes, className, colSpan) {
const td = document.createElement('td');
if (nodes) {
if (!Array.isArray(nodes)) {
nodes = [nodes];
}
td.append(...nodes);
}
if (className) {
td.className = className;
}
if (colSpan) {
td.colSpan = colSpan;
}
return td;
}
function link(href, child, helpText) {
const a = document.createElement('a');
a.setAttribute('href', href);
a.append(child);
if (helpText) {
a.setAttribute('aria-label', helpText);
a.title = helpText;
}
return a;
}
function img(src, width, height, alt, title) {
const img = document.createElement('img');
img.src = src;
img.width = width;
img.height = height;
img.alt = alt;
if (title) {
img.title = title;
}
return img;
}
function positionSpan(position) {
if (!position) {
return null;
}
const span = document.createElement('span');
span.className = `position ${position.replace(/ /g, '-')}`;
span.textContent = position;
return span;
}
function dlItem(term, value) {
const dt = document.createElement('dt');
dt.textContent = term;
const dd = document.createElement('dd');
dd.append(...sanitizeHTML(value));
return [dt, dd];
}
function details(description, rationale, describedById) {
if (!description && !rationale) {
return null;
}
const details = document.createElement('details');
const summary = document.createElement('summary');
summary.textContent = 'Details';
summary.setAttribute('aria-describedby', describedById);
details.append(summary);
const dl = document.createElement('dl');
details.append(dl);
if (description) {
dl.append(...dlItem('Description', description));
}
if (rationale) {
dl.append(...dlItem('Rationale', rationale));
}
return details;
}
const imageMapping = {
'WHATWG': ['WHATWG.svg', 32, 32],
'W3C': ['W3C.svg', 47, 32],
'W3C CG': ['W3C-CG.svg', 32, 32],
'IETF': ['IETF.svg', 60, 32],
'Ecma': ['Ecma.png', 32, 32],
'Unicode': ['Unicode.svg', 32, 32],
'Proposal': ['Proposal.svg', 32, 32],
'Other': ['Other.svg', 32, 32],
};
function venuesImages(venues) {
const rv = [];
for (const venue of venues) {
if (rv.length > 0) {
rv.push(" ");
}
const [filename, width, height] = imageMapping[venue];
rv.push(img(`asset/${filename}`, width, height, venue, venue));
}
return rv;
}
function row(issueNum, { id, url, title, concerns, position, topics, venues, caniuse, bug, mdn, webkit, description, rationale }) {
const tr = document.createElement('tr');
const rv = [tr];
// Link
let selfId = '';
if (id) {
selfId += id;
} else {
selfId += issueNum;
}
tr.id = selfId;
tr.append(cell(link(`#${selfId}`, '🔗', 'Self-link'), 'link'));
// Specification
const specLink = link(url, title);
specLink.id = `speclink-${selfId}`;
tr.append(cell(specLink, 'specification'));
// Position
tr.append(cell(positionSpan(position), 'positions'));
tr.dataset.position = position;
// Concerns
tr.append(cell(concerns?.join(', '), 'concerns'));
// Topics
tr.append(cell(topics?.join(', '), 'topics'));
tr.dataset.topics = topics?.join(' ');
// Venues
tr.append(cell(venuesImages(venues), 'venues'));
tr.dataset.venues = venues?.join(' ');
// More info
const infoLinks = [];
infoLinks.push(link(`https://github.com/mozilla/standards-positions/issues/${issueNum}`, `#${issueNum}`, 'Discussion'));
if (bug) {
infoLinks.push(" ", link(bug, img('asset/bugzilla.png', 32, 32, 'bug'), 'Mozilla bug'));
}
if (mdn) {
infoLinks.push(" ", link(mdn, img('asset/MDN.svg', 32, 32, 'MDN'), 'MDN'));
}
if (caniuse) {
infoLinks.push(" ", link(caniuse, '📊', 'Can I use'));
}
tr.append(cell(infoLinks, 'more-info'));
// Details
if (description || rationale) {
const detailsTr = document.createElement('tr');
detailsTr.className = 'details';
detailsTr.append(cell(details(description, rationale, specLink.id), null, 7));
rv.push(detailsTr);
}
return rv;
}
// Expand details for :target
function expandDetailsForTarget(id) {
const tr = document.getElementById(id);
if (!tr) {
return;
}
if (tr.nextElementSibling.className === "details") {
const details = tr.nextElementSibling.firstChild.firstChild;
details.open = true;
}
}
// Filter/search
function filterTable(searchText) {
const tbody = document.querySelector('tbody');
for (const tr of tbody.children) {
if (tr.classList.contains('details')) {
continue;
}
const show = shouldShowRow(searchText, tr);
tr.hidden = !show;
const nextTr = tr.nextElementSibling;
if (nextTr.classList.contains('details')) {
nextTr.hidden = !show;
}
}
}
function shouldShowRow(searchText, tr) {
const specTitle = tr.firstChild.nextSibling.textContent;
return specTitle.toLowerCase().includes(searchText.toLowerCase());
}
function setupSearch() {
const searchInput = document.querySelector('input[name="search"]');
searchInput.oninput = e => filterTable(searchInput.value);
if (searchInput.value) {
filterTable(searchInput.value);
}
}
async function init() {
const data = await getData();
const tbody = document.querySelector('tbody');
for (const issueNum in data) {
const item = data[issueNum];
// Remove the below if check to include issues without a position.
if (item.position) {
// Newest issue first
tbody.prepend(...row(issueNum, item));
}
}
if (location.hash) {
expandDetailsForTarget(location.hash.substr(1));
}
onhashchange = e => {
expandDetailsForTarget(e.newURL.split('#')[1]);
};
setupSearch();
document.querySelector('.noscript').remove();
document.documentElement.classList.remove('loading');
}
init();
</script>
</body>
</html>