Fix warning deduplication in attribute table (#10594)
* Fix warning deduplication by eval-ing React * Move checkbox to the left * Fix alphabetical sort * Fix the pooling logic * Avoid false positive warning due to controlled/uncontrolled switch * Naming: 15 => Stable, 16 => Next * Prettier * Add "Save" button
Dan Abramov committed
Sep 1, 2017 at 18:37 UTC
3f6e8d28031c85dd3d101e6f259db572d82fe1a1
7 files changed
+2637
-2516
fixtures/attribute-behavior/.gitignore
+1
@@ -10,6 +10,7 @@
10
/build
11
/public/react.development.js
12
/public/react-dom.development.js
13
+/public/react-dom-server.browser.development.js
14
15
# misc
16
.DS_Store
fixtures/attribute-behavior/package.json
+2
-2
@@ -3,6 +3,7 @@
3
"version": "0.1.0",
4
"private": true,
5
"dependencies": {
6
+ "file-saver": "^1.3.3",
7
"glamor": "^2.20.40",
8
"react": "^15.6.1",
9
"react-dom": "^15.6.1",
@@ -10,8 +11,7 @@
11
"react-virtualized": "^9.9.0"
12
},
13
"scripts": {
13
- "prestart":
14
- "cp ../../build/dist/{react,react-dom,react-dom-server.browser}.development.js public/",
14
+ "prestart": "cp ../../build/dist/{react,react-dom,react-dom-server.browser}.development.js public/",
15
"start": "react-scripts start",
16
"build": "react-scripts build",
17
"test": "react-scripts test --env=jsdom",
fixtures/attribute-behavior/src/App.js
+299
-2470
@@ -1,2435 +1,118 @@
1
+import React from 'react';
2
import {createElement} from 'glamor/react'; // eslint-disable-line
3
/* @jsx createElement */
4
5
import {MultiGrid, AutoSizer} from 'react-virtualized';
6
import 'react-virtualized/styles.css';
7
+import FileSaver from 'file-saver';
8
9
import {
10
inject as injectErrorOverlay,
11
uninject as uninjectErrorOverlay,
12
} from 'react-error-overlay/lib/overlay';
13
12
-const React = global.React;
13
-const {Component} = React;
14
+import attributes from './attributes';
15
15
-const ReactDOM15 = global.ReactDOM15;
16
-const ReactDOM16 = global.ReactDOM16;
17
-
18
-const ReactDOMServer15 = global.ReactDOMServer15;
19
-const ReactDOMServer16 = global.ReactDOMServer16;
20
-
21
-const types = [
22
- {
23
- name: 'string',
24
- testValue: 'a string',
25
- testDisplayValue: "'a string'",
26
- },
27
- {
28
- name: 'empty string',
29
- testValue: '',
30
- testDisplayValue: "''",
31
- },
32
- {
33
- name: 'array with string',
34
- testValue: ['string'],
35
- testDisplayValue: "['string']",
36
- },
37
- {
38
- name: 'empty array',
39
- testValue: [],
40
- testDisplayValue: '[]',
41
- },
42
- {
43
- name: 'object',
44
- testValue: {
45
- toString() {
46
- return 'result of toString()';
47
- },
48
- },
49
- testDisplayValue: "{ toString() { return 'result of toString()'; } }",
50
- },
51
- {
52
- name: 'numeric string',
53
- testValue: '42',
54
- displayValue: "'42'",
55
- },
56
- {
57
- name: '-1',
58
- testValue: -1,
59
- },
60
- {
61
- name: '0',
62
- testValue: 0,
63
- },
64
- {
65
- name: 'integer',
66
- testValue: 1,
67
- },
68
- {
69
- name: 'NaN',
70
- testValue: NaN,
71
- },
72
- {
73
- name: 'float',
74
- testValue: 99.99,
75
- },
76
- {
77
- name: 'true',
78
- testValue: true,
79
- },
80
- {
81
- name: 'false',
82
- testValue: false,
83
- },
84
- {
85
- name: "string 'true'",
86
- testValue: 'true',
87
- displayValue: "'true'",
88
- },
89
- {
90
- name: "string 'false'",
91
- testValue: 'false',
92
- displayValue: "'false'",
93
- },
94
- {
95
- name: "string 'on'",
96
- testValue: 'on',
97
- displayValue: "'on'",
98
- },
99
- {
100
- name: "string 'off'",
101
- testValue: 'off',
102
- displayValue: "'off'",
103
- },
104
- {
105
- name: 'symbol',
106
- testValue: Symbol('foo'),
107
- testDisplayValue: "Symbol('foo')",
108
- },
109
- {
110
- name: 'function',
111
- testValue: function f() {},
112
- },
113
- {
114
- name: 'null',
115
- testValue: null,
116
- },
117
- {
118
- name: 'undefined',
119
- testValue: undefined,
120
- },
121
-];
122
-
123
-function getProperty(propertyName) {
124
- return el => el[propertyName];
125
-}
126
-
127
-function getAttribute(attributeName) {
128
- return el => {
129
- if (el.namespaceURI === '') {
130
- throw new Error('Not an HTML element.');
131
- }
132
- return el.getAttribute(attributeName);
133
- };
134
-}
135
-
136
-function getSVGProperty(propertyName) {
137
- return el => el[propertyName];
138
-}
139
-
140
-function getSVGAttribute(attributeName) {
141
- return el => {
142
- if (el.namespaceURI !== 'http://www.w3.org/2000/svg') {
143
- throw new Error('Not an SVG element.');
144
- }
145
- return el.getAttribute(attributeName);
146
- };
147
-}
148
-
149
-const attributes = [
150
- {name: 'about', read: getAttribute('about')},
151
- {name: 'aBoUt', read: getAttribute('about')},
152
- {
153
- name: 'accent-Height',
154
- containerTagName: 'svg',
155
- tagName: 'font-face',
156
- read: getSVGAttribute('accent-height'),
157
- },
158
- {
159
- name: 'accent-height',
160
- containerTagName: 'svg',
161
- tagName: 'font-face',
162
- read: getSVGAttribute('accent-height'),
163
- },
164
- {
165
- name: 'accentHeight',
166
- containerTagName: 'svg',
167
- tagName: 'font-face',
168
- read: getSVGAttribute('accent-height'),
169
- },
170
- {name: 'accept', tagName: 'input'},
171
- {name: 'accept-charset', tagName: 'form', read: getProperty('acceptCharset')},
172
- {name: 'accept-Charset', tagName: 'form', read: getProperty('acceptCharset')},
173
- {name: 'acceptCharset', tagName: 'form'},
174
- {name: 'accessKey'},
175
- {
176
- name: 'accumulate',
177
- containerTagName: 'svg',
178
- tagName: 'animate',
179
- read: getSVGAttribute('accumulate'),
180
- },
181
- {name: 'action', tagName: 'form', overrideStringValue: 'https://reactjs.com'},
182
- {
183
- name: 'additive',
184
- containerTagName: 'svg',
185
- tagName: 'animate',
186
- read: getSVGAttribute('additive'),
187
- },
188
- {
189
- name: 'alignment-baseline',
190
- containerTagName: 'svg',
191
- tagName: 'textPath',
192
- read: getSVGAttribute('alignment-baseline'),
193
- },
194
- {
195
- name: 'alignmentBaseline',
196
- containerTagName: 'svg',
197
- tagName: 'textPath',
198
- read: getSVGAttribute('alignment-baseline'),
199
- },
200
- {
201
- name: 'allowFullScreen',
202
- tagName: 'iframe',
203
- read: getProperty('allowFullscreen'),
204
- },
205
- {
206
- name: 'allowfullscreen',
207
- tagName: 'iframe',
208
- read: getProperty('allowFullscreen'),
209
- },
210
- {name: 'allowFullscreen', tagName: 'iframe'},
211
- {
212
- name: 'allowReorder',
213
- containerTagName: 'svg',
214
- tagName: 'switch',
215
- read: getSVGAttribute('allowReorder'),
216
- },
217
- {
218
- name: 'allowTransparency',
219
- containerTagName: 'svg',
220
- tagName: 'path',
221
- read: getSVGAttribute('allowtransparency'),
222
- },
223
- {
224
- name: 'alphabetic',
225
- containerTagName: 'svg',
226
- tagName: 'font-face',
227
- read: getSVGAttribute('alphabetic'),
228
- },
229
- {name: 'alt', tagName: 'img'},
230
- {
231
- name: 'amplitude',
232
- containerTagName: 'svg',
233
- tagName: 'feFuncA',
234
- read: getSVGProperty('amplitude'),
235
- },
236
- {
237
- name: 'arabic-form',
238
- containerTagName: 'svg',
239
- tagName: 'glyph',
240
- read: getSVGAttribute('arabic-form'),
241
- },
242
- {
243
- name: 'arabicForm',
244
- containerTagName: 'svg',
245
- tagName: 'glyph',
246
- read: getSVGAttribute('arabic-form'),
247
- },
248
- {name: 'aria', read: getAttribute('aria')},
249
- {name: 'aria-', read: getAttribute('aria-')},
250
- {name: 'aria-invalidattribute', read: getAttribute('aria-invalidattribute')},
251
- {name: 'as', tagName: 'link'},
252
- {
253
- name: 'ascent',
254
- containerTagName: 'svg',
255
- tagName: 'font-face',
256
- read: getSVGAttribute('ascent'),
257
- },
258
- {name: 'async', tagName: 'script'},
259
- {
260
- name: 'attributeName',
261
- containerTagName: 'svg',
262
- tagName: 'animate',
263
- read: getSVGAttribute('attributeName'),
264
- },
265
- {
266
- name: 'attributeType',
267
- containerTagName: 'svg',
268
- tagName: 'animate',
269
- read: getSVGAttribute('attributeType'),
270
- },
271
- {
272
- name: 'autoCapitalize',
273
- tagName: 'input',
274
- read: getProperty('autocapitalize'),
275
- overrideStringValue: 'words',
276
- },
277
- {
278
- name: 'autoComplete',
279
- tagName: 'input',
280
- overrideStringValue: 'email',
281
- read: getProperty('autocomplete'),
282
- },
283
- {
284
- name: 'autoCorrect',
285
- tagName: 'input',
286
- overrideStringValue: 'off',
287
- read: getAttribute('autocorrect'),
288
- },
289
- {name: 'autoPlay', tagName: 'video', read: getProperty('autoplay')},
290
- {
291
- name: 'autoReverse',
292
- containerTagName: 'svg',
293
- tagName: 'animate',
294
- read: getSVGAttribute('autoreverse'),
295
- },
296
- {name: 'autoSave', tagName: 'input', read: getAttribute('autosave')},
297
- {
298
- name: 'azimuth',
299
- containerTagName: 'svg',
300
- tagName: 'feDistantLight',
301
- read: getSVGProperty('azimuth'),
302
- },
303
- {
304
- name: 'baseFrequency',
305
- containerTagName: 'svg',
306
- tagName: 'feTurbulence',
307
- read: getSVGAttribute('baseFrequency'),
308
- },
309
- {
310
- name: 'baseline-shift',
311
- containerTagName: 'svg',
312
- tagName: 'textPath',
313
- read: getSVGAttribute('baseline-shift'),
314
- },
315
- {
316
- name: 'baselineShift',
317
- containerTagName: 'svg',
318
- tagName: 'textPath',
319
- read: getSVGAttribute('baseline-shift'),
320
- },
321
- {name: 'baseProfile', tagName: 'svg', read: getSVGAttribute('baseProfile')},
322
- {
323
- name: 'bbox',
324
- containerTagName: 'svg',
325
- tagName: 'font-face',
326
- read: getSVGAttribute('bbox'),
327
- },
328
- {
329
- name: 'begin',
330
- containerTagName: 'svg',
331
- tagName: 'animate',
332
- read: getSVGAttribute('begin'),
333
- },
334
- {
335
- name: 'bias',
336
- containerTagName: 'svg',
337
- tagName: 'feConvolveMatrix',
338
- read: getSVGProperty('bias'),
339
- },
340
- {
341
- name: 'by',
342
- containerTagName: 'svg',
343
- tagName: 'animate',
344
- read: getSVGAttribute('by'),
345
- },
346
- {
347
- name: 'calcMode',
348
- containerTagName: 'svg',
349
- tagName: 'animate',
350
- overrideStringValue: 'discrete',
351
- read: getSVGAttribute('calcMode'),
352
- },
353
- {
354
- name: 'cap-height',
355
- containerTagName: 'svg',
356
- tagName: 'font-face',
357
- read: getSVGAttribute('cap-height'),
358
- },
359
- {
360
- name: 'capHeight',
361
- containerTagName: 'svg',
362
- tagName: 'font-face',
363
- read: getSVGAttribute('cap-height'),
364
- },
365
- {
366
- name: 'capture',
367
- tagName: 'input',
368
- overrideStringValue: 'environment',
369
- read: getAttribute('capture'),
370
- },
371
- {name: 'cellPadding', tagName: 'table'},
372
- {name: 'cellSpacing', tagName: 'table'},
373
- {
374
- name: 'challenge',
375
- tagName: 'keygen',
376
- read: getAttribute('challenge'), // The property is not supported in Chrome.
377
- },
378
- {name: 'charSet', tagName: 'script', read: getProperty('charset')},
379
- {name: 'checked', tagName: 'input'},
380
- {name: 'Checked', tagName: 'input', read: getAttribute('Checked')},
381
- {name: 'Children', read: getAttribute('children')},
382
- {name: 'children'},
383
- {
384
- name: 'cite',
385
- tagName: 'blockquote',
386
- overrideStringValue: 'http://reactjs.com/',
387
- },
388
- {name: 'class', read: getAttribute('class')},
389
- {name: 'classID', tagName: 'object', read: getAttribute('classid')},
390
- {name: 'className'},
391
- {name: 'clip', tagName: 'svg', read: getAttribute('clip')},
392
- {
393
- name: 'clip-path',
394
- containerTagName: 'svg',
395
- tagName: 'path',
396
- read: getSVGAttribute('clip-path'),
397
- },
398
- {
399
- name: 'clipPath',
400
- containerTagName: 'svg',
401
- tagName: 'path',
402
- read: getSVGAttribute('clip-path'),
403
- },
404
- {
405
- name: 'clipPathUnits',
406
- containerTagName: 'svg',
407
- tagName: 'clipPath',
408
- overrideStringValue: 'objectBoundingBox',
409
- read: getSVGProperty('clipPathUnits'),
410
- },
411
- {
412
- name: 'clip-rule',
413
- containerTagName: 'svg',
414
- tagName: 'path',
415
- read: getSVGAttribute('clip-rule'),
416
- },
417
- {
418
- name: 'clipRule',
419
- containerTagName: 'svg',
420
- tagName: 'path',
421
- read: getSVGAttribute('clip-rule'),
422
- },
423
- {
424
- name: 'color',
425
- containerTagName: 'svg',
426
- tagName: 'text',
427
- read: getSVGAttribute('color'),
428
- },
429
- {
430
- name: 'color-interpolation',
431
- containerTagName: 'svg',
432
- tagName: 'animate',
433
- overrideStringValue: 'sRGB',
434
- read: getSVGAttribute('color-interpolation'),
435
- },
436
- {
437
- name: 'colorInterpolation',
438
- containerTagName: 'svg',
439
- tagName: 'animate',
440
- overrideStringValue: 'sRGB',
441
- read: getSVGAttribute('color-interpolation'),
442
- },
443
- {
444
- name: 'color-interpolation-filters',
445
- containerTagName: 'svg',
446
- tagName: 'feComposite',
447
- overrideStringValue: 'sRGB',
448
- read: getSVGAttribute('color-interpolation-filters'),
449
- },
450
- {
451
- name: 'colorInterpolationFilters',
452
- containerTagName: 'svg',
453
- tagName: 'feComposite',
454
- overrideStringValue: 'sRGB',
455
- read: getSVGAttribute('color-interpolation-filters'),
456
- },
457
- {
458
- name: 'color-profile',
459
- containerTagName: 'svg',
460
- tagName: 'image',
461
- overrideStringValue: 'sRGB',
462
- read: getSVGAttribute('color-profile'),
463
- },
464
- {
465
- name: 'colorProfile',
466
- containerTagName: 'svg',
467
- tagName: 'image',
468
- overrideStringValue: 'sRGB',
469
- read: getSVGAttribute('color-profile'),
470
- },
471
- {
472
- name: 'color-rendering',
473
- containerTagName: 'svg',
474
- tagName: 'animate',
475
- overrideStringValue: 'optimizeSpeed',
476
- read: getSVGAttribute('color-rendering'),
477
- },
478
- {
479
- name: 'colorRendering',
480
- containerTagName: 'svg',
481
- tagName: 'animate',
482
- overrideStringValue: 'optimizeSpeed',
483
- read: getSVGAttribute('color-rendering'),
484
- },
485
- {name: 'cols', tagName: 'textarea'},
486
- {name: 'colSpan', containerTagName: 'tr', tagName: 'td'},
487
- {name: 'content', tagName: 'meta'},
488
- {name: 'contentEditable'},
489
- {
490
- name: 'contentScriptType',
491
- tagName: 'svg',
492
- read: getSVGAttribute('contentScriptType'),
493
- },
494
- {
495
- name: 'contentStyleType',
496
- tagName: 'svg',
497
- read: getSVGAttribute('contentStyleType'),
498
- },
499
- {name: 'contextMenu', read: getAttribute('contextmenu')}, // TODO: Read the property by rendering a menu with the ID.
500
- {name: 'controls', tagName: 'video'},
501
- {name: 'coords', tagName: 'a'},
502
- {name: 'crossOrigin', tagName: 'script'},
503
- {name: 'cursor', tag: 'svg', read: getAttribute('cursor')},
504
- {
505
- name: 'cx',
506
- containerTagName: 'svg',
507
- tagName: 'circle',
508
- overrideStringValue: '10px',
509
- read: getSVGProperty('cx'),
510
- },
511
- {
512
- name: 'cy',
513
- containerTagName: 'svg',
514
- tagName: 'circle',
515
- overrideStringValue: '10%',
516
- read: getSVGProperty('cy'),
517
- },
518
- {
519
- name: 'd',
520
- containerTagName: 'svg',
521
- tagName: 'path',
522
- read: getSVGAttribute('d'),
523
- },
524
- {
525
- name: 'dangerouslySetInnerHTML',
526
- read: getAttribute('dangerouslySetInnerHTML'),
527
- },
528
- {
529
- name: 'DangerouslySetInnerHTML',
530
- read: getAttribute('DangerouslySetInnerHTML'),
531
- },
532
- {name: 'data', read: getAttribute('data')},
533
- {name: 'data-', read: getAttribute('data-')},
534
- {name: 'data-unknownattribute', read: getAttribute('data-unknownattribute')},
535
- {name: 'datatype', read: getAttribute('datatype')},
536
- {
537
- name: 'dateTime',
538
- tagName: 'time',
539
- overrideStringValue: '2001-05-15T19:00',
540
- read: getAttribute('datetime'),
541
- },
542
- {
543
- name: 'decelerate',
544
- containerTagName: 'svg',
545
- tagName: 'animate',
546
- read: getSVGAttribute('decelerate'),
547
- },
548
- {name: 'default', tagName: 'track'},
549
- {
550
- name: 'defaultchecked',
551
- tagName: 'input',
552
- read: getAttribute('defaultchecked'),
553
- },
554
- {name: 'defaultChecked', tagName: 'input'},
555
- {name: 'defaultValue', tagName: 'input'},
556
- {name: 'defaultValuE', tagName: 'input', read: getAttribute('defaultValuE')},
557
- {name: 'defer', tagName: 'script'},
558
- {
559
- name: 'descent',
560
- containerTagName: 'svg',
561
- tagName: 'font-face',
562
- read: getSVGAttribute('descent'),
563
- },
564
- {
565
- name: 'diffuseConstant',
566
- containerTagName: 'svg',
567
- tagName: 'feDiffuseLighting',
568
- read: getSVGProperty('diffuseConstant'),
569
- },
570
- {name: 'dir', overrideStringValue: 'rtl'},
571
- {
572
- name: 'direction',
573
- containerTagName: 'svg',
574
- tagName: 'text',
575
- overrideStringValue: 'rtl',
576
- read: getSVGAttribute('direction'),
577
- },
578
- {name: 'disabled', tagName: 'input'},
579
- {
580
- name: 'display',
581
- tagName: 'svg',
582
- overrideStringValue: 'list-item',
583
- read: getAttribute('display'),
584
- },
585
- {
586
- name: 'divisor',
587
- containerTagName: 'svg',
588
- tagName: 'feConvolveMatrix',
589
- read: getSVGProperty('divisor'),
590
- },
591
- {
592
- name: 'dominant-baseline',
593
- containerTagName: 'svg',
594
- tagName: 'text',
595
- read: getSVGAttribute('dominant-baseline'),
596
- },
597
- {
598
- name: 'dominantBaseline',
599
- containerTagName: 'svg',
600
- tagName: 'text',
601
- read: getSVGAttribute('dominant-baseline'),
602
- },
603
- {name: 'download', tagName: 'a'},
604
- {name: 'dOwNlOaD', tagName: 'a', read: getAttribute('dOwNlOaD')},
605
- {name: 'draggable'},
606
- {
607
- name: 'dur',
608
- containerTagName: 'svg',
609
- tagName: 'animate',
610
- read: getSVGAttribute('dur'),
611
- },
612
- {
613
- name: 'dx',
614
- containerTagName: 'svg',
615
- tagName: 'text',
616
- overrideStringValue: '1pt 2px 3em',
617
- read: getSVGProperty('dx'),
618
- },
619
- {
620
- name: 'dX',
621
- containerTagName: 'svg',
622
- tagName: 'text',
623
- overrideStringValue: '1pt 2px 3em',
624
- read: getSVGProperty('dx'),
625
- },
626
- {
627
- name: 'dy',
628
- containerTagName: 'svg',
629
- tagName: 'text',
630
- overrideStringValue: '1 2 3',
631
- read: getSVGProperty('dy'),
632
- },
633
- {
634
- name: 'dY',
635
- containerTagName: 'svg',
636
- tagName: 'text',
637
- overrideStringValue: '1 2 3',
638
- read: getSVGProperty('dy'),
639
- },
640
- {
641
- name: 'edgeMode',
642
- containerTagName: 'svg',
643
- tagName: 'feConvolveMatrix',
644
- overrideStringValue: 'wrap',
645
- read: getSVGProperty('edgeMode'),
646
- },
647
- {
648
- name: 'elevation',
649
- containerTagName: 'svg',
650
- tagName: 'feDistantLight',
651
- read: getSVGProperty('elevation'),
652
- },
653
- {
654
- name: 'enable-background',
655
- containerTagName: 'svg',
656
- tagName: 'path',
657
- read: getSVGAttribute('enable-background'),
658
- },
659
- {
660
- name: 'enableBackground',
661
- containerTagName: 'svg',
662
- tagName: 'path',
663
- read: getSVGAttribute('enable-background'),
664
- },
665
- {
666
- name: 'encType',
667
- tagName: 'form',
668
- overrideStringValue: 'text/plain',
669
- read: getProperty('enctype'),
670
- },
671
- {
672
- name: 'end',
673
- containerTagName: 'svg',
674
- tagName: 'animate',
675
- read: getSVGAttribute('end'),
676
- },
677
- {
678
- name: 'exponent',
679
- read: getSVGProperty('exponent'),
680
- containerTagName: 'svg',
681
- tagName: 'feFuncA',
682
- },
683
- {
684
- name: 'externalResourcesRequired',
685
- containerTagName: 'svg',
686
- tagName: 'path',
687
- read: getSVGAttribute('externalResourcesRequired'),
688
- },
689
- {
690
- name: 'fill',
691
- containerTagName: 'svg',
692
- tagName: 'path',
693
- read: getSVGAttribute('fill'),
694
- },
695
- {
696
- name: 'fillOpacity',
697
- containerTagName: 'svg',
698
- tagName: 'circle',
699
- read: getSVGAttribute('fill-opacity'),
700
- },
701
- {
702
- name: 'fill-opacity',
703
- containerTagName: 'svg',
704
- tagName: 'circle',
705
- read: getSVGAttribute('fill-opacity'),
706
- },
707
- {
708
- name: 'fillRule',
709
- containerTagName: 'svg',
710
- tagName: 'circle',
711
- read: getSVGAttribute('fill-rule'),
712
- },
713
- {
714
- name: 'fill-rule',
715
- containerTagName: 'svg',
716
- tagName: 'circle',
717
- read: getSVGAttribute('fill-rule'),
718
- },
719
- {
720
- name: 'filter',
721
- containerTagName: 'svg',
722
- tagName: 'g',
723
- read: getSVGAttribute('filter'),
724
- },
725
- {
726
- name: 'filterRes',
727
- containerTagName: 'svg',
728
- tagName: 'filter',
729
- read: getSVGAttribute('filterRes'),
730
- },
731
- {
732
- name: 'filterUnits',
733
- containerTagName: 'svg',
734
- tagName: 'filter',
735
- overrideStringValue: 'userSpaceOnUse',
736
- read: getSVGProperty('filterUnits'),
737
- },
738
- {
739
- name: 'flood-color',
740
- containerTagName: 'svg',
741
- tagName: 'feflood',
742
- overrideStringValue: 'currentColor',
743
- read: getSVGAttribute('flood-color'),
744
- },
745
- {
746
- name: 'floodColor',
747
- containerTagName: 'svg',
748
- tagName: 'feflood',
749
- overrideStringValue: 'currentColor',
750
- read: getSVGAttribute('flood-color'),
751
- },
752
- {
753
- name: 'flood-opacity',
754
- containerTagName: 'svg',
755
- tagName: 'feflood',
756
- overrideStringValue: 'inherit',
757
- read: getSVGAttribute('flood-opacity'),
758
- },
759
- {
760
- name: 'floodOpacity',
761
- containerTagName: 'svg',
762
- tagName: 'feflood',
763
- overrideStringValue: 'inherit',
764
- read: getSVGAttribute('flood-opacity'),
765
- },
766
- {name: 'focusable', tagName: 'p', read: getAttribute('focusable')},
767
- {
768
- name: 'font-family',
769
- read: getSVGAttribute('font-family'),
770
- containerTagName: 'svg',
771
- tagName: 'font-face',
772
- },
773
- {
774
- name: 'font-size',
775
- read: getSVGAttribute('font-size'),
776
- containerTagName: 'svg',
777
- tagName: 'font-face',
778
- },
779
- {
780
- name: 'font-size-adjust',
781
- containerTagName: 'svg',
782
- tagName: 'text',
783
- read: getSVGAttribute('font-size-adjust'),
784
- },
785
- {
786
- name: 'font-stretch',
787
- read: getSVGAttribute('font-stretch'),
788
- containerTagName: 'svg',
789
- tagName: 'font-face',
790
- },
791
- {
792
- name: 'font-style',
793
- read: getSVGAttribute('font-style'),
794
- containerTagName: 'svg',
795
- tagName: 'font-face',
796
- },
797
- {
798
- name: 'font-variant',
799
- read: getSVGAttribute('font-variant'),
800
- containerTagName: 'svg',
801
- tagName: 'font-face',
802
- },
803
- {
804
- name: 'font-weight',
805
- read: getSVGAttribute('font-weight'),
806
- containerTagName: 'svg',
807
- tagName: 'font-face',
808
- },
809
- {
810
- name: 'fontFamily',
811
- read: getSVGAttribute('font-family'),
812
- containerTagName: 'svg',
813
- tagName: 'font-face',
814
- },
815
- {
816
- name: 'fontSize',
817
- read: getSVGAttribute('font-size'),
818
- containerTagName: 'svg',
819
- tagName: 'font-face',
820
- },
821
- {
822
- name: 'fontSizeAdjust',
823
- containerTagName: 'svg',
824
- tagName: 'text',
825
- read: getSVGAttribute('font-size-adjust'),
826
- },
827
- {
828
- name: 'fontStretch',
829
- read: getSVGAttribute('font-stretch'),
830
- containerTagName: 'svg',
831
- tagName: 'font-face',
832
- },
833
- {
834
- name: 'fontStyle',
835
- read: getSVGAttribute('font-style'),
836
- containerTagName: 'svg',
837
- tagName: 'font-face',
838
- },
839
- {
840
- name: 'fontVariant',
841
- read: getSVGAttribute('font-variant'),
842
- containerTagName: 'svg',
843
- tagName: 'font-face',
844
- },
845
- {
846
- name: 'fontWeight',
847
- read: getSVGAttribute('font-weight'),
848
- containerTagName: 'svg',
849
- tagName: 'font-face',
850
- },
851
- {name: 'for', tagName: 'label', read: getProperty('htmlFor')},
852
- {name: 'fOr', tagName: 'label', read: getProperty('htmlFor')},
853
- {name: 'form', read: getAttribute('form')}, // TODO: Read the property by rendering into a form with i
854
- {
855
- name: 'formAction',
856
- tagName: 'input',
857
- overrideStringValue: 'https://reactjs.com',
858
- },
859
- {
860
- name: 'format',
861
- read: getSVGAttribute('format'),
862
- containerTagName: 'svg',
863
- tagName: 'altGlyph',
864
- },
865
- {name: 'formEncType', tagName: 'input', read: getProperty('formEnctype')},
866
- {name: 'formMethod', tagName: 'input', overrideStringValue: 'POST'},
867
- {name: 'formNoValidate', tagName: 'input'},
868
- {name: 'formTarget', tagName: 'input'},
869
- {name: 'frameBorder', tagName: 'iframe'},
870
- {
871
- name: 'from',
872
- read: getSVGAttribute('from'),
873
- containerTagName: 'svg',
874
- tagName: 'animate',
875
- },
876
- {
877
- name: 'fx',
878
- read: getSVGProperty('fx'),
879
- containerTagName: 'svg',
880
- overrideStringValue: '10px',
881
- tagName: 'radialGradient',
882
- },
883
- {
884
- name: 'fX',
885
- containerTagName: 'svg',
886
- tagName: 'radialGradient',
887
- overrideStringValue: '10px',
888
- read: getSVGProperty('fx'),
889
- },
890
- {
891
- name: 'fY',
892
- containerTagName: 'svg',
893
- tagName: 'radialGradient',
894
- overrideStringValue: '20em',
895
- read: getSVGProperty('fy'),
896
- },
897
- {
898
- name: 'fy',
899
- read: getSVGProperty('fy'),
900
- containerTagName: 'svg',
901
- overrideStringValue: '20em',
902
- tagName: 'radialGradient',
903
- },
904
- {
905
- name: 'G1',
906
- containerTagName: 'svg',
907
- tagName: 'hkern',
908
- read: getSVGAttribute('g1'),
909
- },
910
- {
911
- name: 'g1',
912
- read: getSVGAttribute('g1'),
913
- containerTagName: 'svg',
914
- tagName: 'hkern',
915
- },
916
- {
917
- name: 'G2',
918
- containerTagName: 'svg',
919
- tagName: 'hkern',
920
- read: getSVGAttribute('g2'),
921
- },
922
- {
923
- name: 'g2',
924
- read: getSVGAttribute('g2'),
925
- containerTagName: 'svg',
926
- tagName: 'hkern',
927
- },
928
- {
929
- name: 'glyph-name',
930
- read: getSVGAttribute('glyph-name'),
931
- containerTagName: 'svg',
932
- tagName: 'glyph',
933
- },
934
- {
935
- name: 'glyph-orientation-horizontal',
936
- containerTagName: 'svg',
937
- tagName: 'text',
938
- read: getSVGAttribute('glyph-orientation-horizontal'),
939
- },
940
- {
941
- name: 'glyph-orientation-vertical',
942
- containerTagName: 'svg',
943
- tagName: 'text',
944
- read: getSVGAttribute('glyph-orientation-vertical'),
945
- },
946
- {
947
- name: 'glyphName',
948
- read: getSVGAttribute('glyph-name'),
949
- containerTagName: 'svg',
950
- tagName: 'glyph',
951
- },
952
- {
953
- name: 'glyphOrientationHorizontal',
954
- containerTagName: 'svg',
955
- tagName: 'text',
956
- read: getSVGAttribute('glyph-orientation-horizontal'),
957
- },
958
- {
959
- name: 'glyphOrientationVertical',
960
- containerTagName: 'svg',
961
- tagName: 'text',
962
- read: getSVGAttribute('glyph-orientation-vertical'),
963
- },
964
- {
965
- name: 'glyphRef',
966
- read: getSVGAttribute('glyph-ref'),
967
- containerTagName: 'svg',
968
- tagName: 'altGlyph',
969
- },
970
- {
971
- name: 'gradientTransform',
972
- read: getSVGProperty('gradientTransform'),
973
- containerTagName: 'svg',
974
- overrideStringValue: 'translate(-10,-20) scale(2) rotate(45) translate(5,10)',
975
- tagName: 'linearGradient',
976
- },
977
- {
978
- name: 'gradientUnits',
979
- read: getSVGProperty('gradientUnits'),
980
- containerTagName: 'svg',
981
- overrideStringValue: 'userSpaceOnUse',
982
- tagName: 'linearGradient',
983
- },
984
- {
985
- name: 'hanging',
986
- read: getSVGAttribute('hanging'),
987
- containerTagName: 'svg',
988
- tagName: 'font-face',
989
- },
990
- // Disabled because it crashes other tests with React 15.
991
- // TODO: re-enable when we no longer compare to 15.
992
- // {name: 'hasOwnProperty', read: getAttribute('hasOwnProperty')},
993
- {name: 'headers', containerTagName: 'tr', tagName: 'td'},
994
- {name: 'height', tagName: 'img'},
995
- {
996
- name: 'height',
997
- containerTagName: 'svg',
998
- tagName: 'rect',
999
- read: getSVGProperty('height'),
1000
- overrideStringValue: '100%',
1001
- },
1002
- {name: 'hidden'},
1003
- {name: 'high', tagName: 'meter'},
1004
- {
1005
- name: 'horiz-adv-x',
1006
- read: getSVGAttribute('horiz-adv-x'),
1007
- containerTagName: 'svg',
1008
- tagName: 'font',
1009
- },
1010
- {
1011
- name: 'horiz-origin-x',
1012
- read: getSVGAttribute('horiz-origin-x'),
1013
- containerTagName: 'svg',
1014
- tagName: 'font',
1015
- },
1016
- {
1017
- name: 'horizAdvX',
1018
- read: getSVGAttribute('horiz-adv-x'),
1019
- containerTagName: 'svg',
1020
- tagName: 'font',
1021
- },
1022
- {
1023
- name: 'horizOriginX',
1024
- read: getSVGAttribute('horiz-origin-x'),
1025
- containerTagName: 'svg',
1026
- tagName: 'font',
1027
- },
1028
- {name: 'href', tagName: 'a', overrideStringValue: 'https://reactjs.com'},
1029
- {name: 'hrefLang', read: getAttribute('hreflang')},
1030
- {name: 'htmlFor', tagName: 'label'},
1031
- {name: 'http-equiv', tagName: 'meta', read: getProperty('httpEquiv')},
1032
- {name: 'httpEquiv', tagName: 'meta'},
1033
- {name: 'icon', tagName: 'command', read: getAttribute('icon')},
1034
- {name: 'id'},
1035
- {name: 'ID', read: getProperty('id')},
1036
- {
1037
- name: 'ideographic',
1038
- read: getSVGAttribute('ideographic'),
1039
- containerTagName: 'svg',
1040
- tagName: 'font-face',
1041
- },
1042
- {
1043
- name: 'image-rendering',
1044
- tagName: 'svg',
1045
- read: getSVGAttribute('image-rendering'),
1046
- },
1047
- {
1048
- name: 'imageRendering',
1049
- tagName: 'svg',
1050
- read: getSVGAttribute('image-rendering'),
1051
- },
1052
- {
1053
- name: 'in',
1054
- read: getSVGAttribute('in'),
1055
- containerTagName: 'svg',
1056
- tagName: 'feBlend',
1057
- },
1058
- {
1059
- name: 'in2',
1060
- read: getSVGProperty('in2'),
1061
- containerTagName: 'svg',
1062
- tagName: 'feBlend',
1063
- },
1064
- {name: 'initialChecked', read: getAttribute('initialchecked')},
1065
- {name: 'initialValue', read: getAttribute('initialvalue')},
1066
- {name: 'inlist', read: getAttribute('inlist')},
1067
- {name: 'inputMode', tagName: 'input', read: getAttribute('inputmode')}, // TODO: Should use property but it's not implemented in Chrome
1068
- {name: 'integrity', tagName: 'script'},
1069
- {
1070
- name: 'intercept',
1071
- read: getSVGProperty('intercept'),
1072
- containerTagName: 'svg',
1073
- tagName: 'feFuncA',
1074
- },
1075
- {
1076
- name: 'is',
1077
- tagName: 'button',
1078
- overrideStringValue: 'x-test-element',
1079
- read: getAttribute('is'), // TODO: This could check if this is an extended custom element but this is a controversial spec.
1080
- },
1081
- {name: 'itemID', read: getAttribute('itemid')},
1082
- {name: 'itemProp', read: getAttribute('itemprop')},
1083
- {name: 'itemRef', read: getAttribute('itemref')},
1084
- {name: 'itemScope', read: getAttribute('itemscope')},
1085
- {name: 'itemType', read: getAttribute('itemtype')},
1086
- {
1087
- name: 'k',
1088
- read: getSVGAttribute('k'),
1089
- containerTagName: 'svg',
1090
- tagName: 'hkern',
1091
- },
1092
- {
1093
- name: 'K',
1094
- containerTagName: 'svg',
1095
- tagName: 'hkern',
1096
- read: getSVGAttribute('k'),
1097
- },
1098
- {
1099
- name: 'K1',
1100
- containerTagName: 'svg',
1101
- tagName: 'feComposite',
1102
- read: getSVGProperty('k1'),
1103
- },
1104
- {
1105
- name: 'k1',
1106
- read: getSVGProperty('k1'),
1107
- containerTagName: 'svg',
1108
- tagName: 'feComposite',
1109
- },
1110
- {
1111
- name: 'k2',
1112
- read: getSVGProperty('k2'),
1113
- containerTagName: 'svg',
1114
- tagName: 'feComposite',
1115
- },
1116
- {
1117
- name: 'k3',
1118
- read: getSVGProperty('k3'),
1119
- containerTagName: 'svg',
1120
- tagName: 'feComposite',
1121
- },
1122
- {
1123
- name: 'k4',
1124
- read: getSVGProperty('k4'),
1125
- containerTagName: 'svg',
1126
- tagName: 'feComposite',
1127
- },
1128
- {
1129
- name: 'kernelMatrix',
1130
- read: getSVGProperty('kernelMatrix'),
1131
- containerTagName: 'svg',
1132
- tagName: 'feConvolveMatrix',
1133
- overrideStringValue: '1 2 3,4',
1134
- },
1135
- {
1136
- name: 'kernelUnitLength',
1137
- read: getSVGAttribute('kernelUnitLength'),
1138
- containerTagName: 'svg',
1139
- tagName: 'feConvolveMatrix',
1140
- },
1141
- {
1142
- name: 'kerning',
1143
- containerTagName: 'svg',
1144
- tagName: 'text',
1145
- read: getSVGAttribute('kerning'),
1146
- },
1147
- {name: 'keyParams', read: getAttribute('keyParams')},
1148
- {
1149
- name: 'keyPoints',
1150
- read: getSVGAttribute('keyPoints'),
1151
- containerTagName: 'svg',
1152
- tagName: 'animateMotion',
1153
- },
1154
- {
1155
- name: 'keySplines',
1156
- read: getSVGAttribute('keySplines'),
1157
- containerTagName: 'svg',
1158
- tagName: 'animate',
1159
- },
1160
- {
1161
- name: 'keyTimes',
1162
- read: getSVGAttribute('keyTimes'),
1163
- containerTagName: 'svg',
1164
- tagName: 'animate',
1165
- },
1166
- {name: 'keyType', read: getAttribute('keyType')},
1167
- {name: 'kind', tagName: 'track', overrideStringValue: 'captions'},
1168
- {name: 'label', tagName: 'track'},
1169
- {name: 'LANG', read: getProperty('lang')},
1170
- {name: 'lang'},
1171
- {name: 'length', read: getAttribute('length')},
1172
- {
1173
- name: 'lengthAdjust',
1174
- read: getSVGProperty('lengthAdjust'),
1175
- containerTagName: 'svg',
1176
- tagName: 'text',
1177
- overrideStringValue: 'spacingAndGlyphs',
1178
- },
1179
- {
1180
- name: 'letter-spacing',
1181
- containerTagName: 'svg',
1182
- tagName: 'text',
1183
- read: getSVGAttribute('letter-spacing'),
1184
- },
1185
- {
1186
- name: 'letterSpacing',
1187
- containerTagName: 'svg',
1188
- tagName: 'text',
1189
- read: getSVGAttribute('letter-spacing'),
1190
- },
1191
- {
1192
- name: 'lighting-color',
1193
- containerTagName: 'svg',
1194
- tagName: 'feDiffuseLighting',
1195
- read: getSVGAttribute('lighting-color'),
1196
- },
1197
- {
1198
- name: 'lightingColor',
1199
- containerTagName: 'svg',
1200
- tagName: 'feDiffuseLighting',
1201
- read: getSVGAttribute('lighting-color'),
1202
- },
1203
- {
1204
- name: 'limitingConeAngle',
1205
- read: getSVGProperty('limitingConeAngle'),
1206
- containerTagName: 'svg',
1207
- tagName: 'feSpotLight',
1208
- },
1209
- {name: 'list', read: getAttribute('list')}, // TODO: This should match the ID of a datalist element and then read property.
1210
- {
1211
- name: 'local',
1212
- read: getSVGAttribute('local'),
1213
- containerTagName: 'svg',
1214
- tagName: 'color-profile',
1215
- },
1216
- {name: 'loop', tagName: 'audio'},
1217
- {name: 'low', tagName: 'meter'},
1218
- {name: 'manifest', read: getAttribute('manifest')},
1219
- {name: 'marginHeight', containerTagName: 'frameset', tagName: 'frame'},
1220
- {name: 'marginWidth', containerTagName: 'frameset', tagName: 'frame'},
1221
- {
1222
- name: 'marker-end',
1223
- containerTagName: 'svg',
1224
- tagName: 'line',
1225
- read: getSVGAttribute('marker-end'),
1226
- },
1227
- {
1228
- name: 'marker-mid',
1229
- containerTagName: 'svg',
1230
- tagName: 'line',
1231
- read: getSVGAttribute('marker-mid'),
1232
- },
1233
- {
1234
- name: 'marker-start',
1235
- containerTagName: 'svg',
1236
- tagName: 'line',
1237
- read: getSVGAttribute('marker-start'),
1238
- },
1239
- {
1240
- name: 'markerEnd',
1241
- containerTagName: 'svg',
1242
- tagName: 'line',
1243
- read: getSVGAttribute('marker-end'),
1244
- },
1245
- {
1246
- name: 'markerHeight',
1247
- read: getSVGProperty('markerHeight'),
1248
- containerTagName: 'svg',
1249
- tagName: 'marker',
1250
- },
1251
- {
1252
- name: 'markerMid',
1253
- containerTagName: 'svg',
1254
- tagName: 'line',
1255
- read: getSVGAttribute('marker-mid'),
1256
- },
1257
- {
1258
- name: 'markerStart',
1259
- containerTagName: 'svg',
1260
- tagName: 'line',
1261
- read: getSVGAttribute('marker-start'),
1262
- },
1263
- {
1264
- name: 'markerUnits',
1265
- read: getSVGProperty('markerUnits'),
1266
- containerTagName: 'svg',
1267
- tagName: 'marker',
1268
- },
1269
- {
1270
- name: 'markerWidth',
1271
- read: getSVGProperty('markerWidth'),
1272
- containerTagName: 'svg',
1273
- tagName: 'marker',
1274
- },
1275
- {
1276
- name: 'mask',
1277
- containerTagName: 'svg',
1278
- tagName: 'path',
1279
- read: getSVGAttribute('mask'),
1280
- },
1281
- {
1282
- name: 'maskContentUnits',
1283
- read: getSVGProperty('maskContentUnits'),
1284
- containerTagName: 'svg',
1285
- tagName: 'mask',
1286
- overrideStringValue: 'objectBoundingBox',
1287
- },
1288
- {
1289
- name: 'maskUnits',
1290
- read: getSVGProperty('maskUnits'),
1291
- containerTagName: 'svg',
1292
- tagName: 'mask',
1293
- overrideStringValue: 'userSpaceOnUse',
1294
- },
1295
- {
1296
- name: 'mathematical',
1297
- read: getSVGAttribute('mathematical'),
1298
- containerTagName: 'svg',
1299
- tagName: 'font-face',
1300
- },
1301
- {name: 'max', tagName: 'input'},
1302
- {name: 'max', tagName: 'meter'},
1303
- {name: 'max', tagName: 'progress'},
1304
- {
1305
- name: 'max',
1306
- containerTagName: 'svg',
1307
- tagName: 'animate',
1308
- read: getSVGAttribute('max'),
1309
- },
1310
- {name: 'maxLength', tagName: 'textarea'},
1311
- {name: 'media', tagName: 'link'},
1312
- {
1313
- name: 'media',
1314
- containerTagName: 'svg',
1315
- tagName: 'style',
1316
- read: getSVGProperty('media'),
1317
- },
1318
- {name: 'mediaGroup', tagName: 'video', read: getAttribute('mediagroup')}, // TODO: Not yet implemented in Chrome.
1319
- {name: 'method', tagName: 'form', overrideStringValue: 'POST'},
1320
- {
1321
- name: 'method',
1322
- containerTagName: 'svg',
1323
- tagName: 'textPath',
1324
- read: getSVGProperty('method'),
1325
- overrideStringValue: 'stretch',
1326
- },
1327
- {name: 'min', tagName: 'input'},
1328
- {name: 'min', tagName: 'meter'},
1329
- {
1330
- name: 'min',
1331
- containerTagName: 'svg',
1332
- tagName: 'animate',
1333
- read: getSVGAttribute('min'),
1334
- },
1335
- {name: 'minLength', tagName: 'input'},
1336
- {
1337
- name: 'mode',
1338
- read: getSVGProperty('mode'),
1339
- containerTagName: 'svg',
1340
- tagName: 'feBlend',
1341
- overrideStringValue: 'multiply',
1342
- },
1343
- {name: 'multiple', tagName: 'select'},
1344
- {name: 'muted', tagName: 'video'},
1345
- {name: 'name', tagName: 'input'},
1346
- {
1347
- name: 'name',
1348
- containerTagName: 'svg',
1349
- tagName: 'color-profile',
1350
- read: getSVGAttribute('color-profile'),
1351
- },
1352
- {name: 'nonce', read: getAttribute('nonce')},
1353
- {name: 'noValidate', tagName: 'form'},
1354
- {
1355
- name: 'numOctaves',
1356
- read: getSVGProperty('numOctaves'),
1357
- containerTagName: 'svg',
1358
- tagName: 'feTurbulence',
1359
- },
1360
- {
1361
- name: 'offset',
1362
- read: getSVGProperty('offset'),
1363
- containerTagName: 'svg',
1364
- tagName: 'stop',
1365
- },
1366
- {name: 'on-click'}, // TODO: Check for event subscriptions
1367
- {name: 'on-unknownevent'}, // TODO: Check for event subscriptions
1368
- {name: 'onclick'}, // TODO: Check for event subscriptions
1369
- {name: 'onClick'}, // TODO: Check for event subscriptions
1370
- {name: 'onunknownevent'}, // TODO: Check for event subscriptions
1371
- {name: 'onUnknownEvent'}, // TODO: Check for event subscriptions
1372
- {
1373
- name: 'opacity',
1374
- containerTagName: 'svg',
1375
- tagName: 'path',
1376
- read: getSVGAttribute('opacity'),
1377
- },
1378
- {name: 'open', tagName: 'details'},
1379
- {
1380
- name: 'operator',
1381
- read: getSVGProperty('operator'),
1382
- containerTagName: 'svg',
1383
- tagName: 'feComposite',
1384
- overrideStringValue: 'xor',
1385
- },
1386
- {name: 'optimum', tagName: 'meter'},
1387
- {
1388
- name: 'order',
1389
- read: getSVGAttribute('order'),
1390
- containerTagName: 'svg',
1391
- tagName: 'feConvolveMatrix',
1392
- },
1393
- {
1394
- name: 'orient',
1395
- read: getSVGAttribute('orient'),
1396
- containerTagName: 'svg',
1397
- tagName: 'marker',
1398
- },
1399
- {
1400
- name: 'orientation',
1401
- read: getSVGAttribute('orientation'),
1402
- containerTagName: 'svg',
1403
- tagName: 'glyph',
1404
- },
1405
- {
1406
- name: 'origin',
1407
- read: getSVGAttribute('origin'),
1408
- containerTagName: 'svg',
1409
- tagName: 'animateMotion',
1410
- },
1411
- {
1412
- name: 'overflow',
1413
- containerTagName: 'svg',
1414
- tagName: 'path',
1415
- read: getSVGAttribute('overflow'),
1416
- },
1417
- {
1418
- name: 'overline-position',
1419
- read: getSVGAttribute('overline-position'),
1420
- containerTagName: 'svg',
1421
- tagName: 'font-face',
1422
- },
1423
- {
1424
- name: 'overline-thickness',
1425
- read: getSVGAttribute('overline-thickness'),
1426
- containerTagName: 'svg',
1427
- tagName: 'font-face',
1428
- },
1429
- {
1430
- name: 'overlinePosition',
1431
- read: getSVGAttribute('overline-position'),
1432
- containerTagName: 'svg',
1433
- tagName: 'font-face',
1434
- },
1435
- {
1436
- name: 'overlineThickness',
1437
- read: getSVGAttribute('overline-thickness'),
1438
- containerTagName: 'svg',
1439
- tagName: 'font-face',
1440
- },
1441
- {
1442
- name: 'paint-order',
1443
- containerTagName: 'svg',
1444
- tagName: 'path',
1445
- read: getSVGAttribute('paint-order'),
1446
- },
1447
- {
1448
- name: 'paintOrder',
1449
- containerTagName: 'svg',
1450
- tagName: 'path',
1451
- read: getSVGAttribute('paint-order'),
1452
- },
1453
- {
1454
- name: 'panose-1',
1455
- read: getSVGAttribute('panose-1'),
1456
- containerTagName: 'svg',
1457
- tagName: 'font-face',
1458
- },
1459
- {
1460
- name: 'panose1',
1461
- containerTagName: 'svg',
1462
- tagName: 'font-face',
1463
- read: getSVGAttribute('panose-1'),
1464
- },
1465
- {
1466
- name: 'pathLength',
1467
- read: getSVGProperty('pathLength'),
1468
- containerTagName: 'svg',
1469
- tagName: 'path',
1470
- },
1471
- {name: 'pattern', tagName: 'input'},
1472
- {
1473
- name: 'patternContentUnits',
1474
- read: getSVGProperty('patternContentUnits'),
1475
- containerTagName: 'svg',
1476
- tagName: 'pattern',
1477
- overrideStringValue: 'objectBoundingBox',
1478
- },
1479
- {
1480
- name: 'patternTransform',
1481
- read: getSVGProperty('patternTransform'),
1482
- containerTagName: 'svg',
1483
- tagName: 'pattern',
1484
- overrideStringValue: 'translate(-10,-20) scale(2) rotate(45) translate(5,10)',
1485
- },
1486
- {
1487
- name: 'patternUnits',
1488
- read: getSVGProperty('patternUnits'),
1489
- containerTagName: 'svg',
1490
- tagName: 'pattern',
1491
- overrideStringValue: 'userSpaceOnUse',
1492
- },
1493
- {name: 'placeholder', tagName: 'input'},
1494
- {name: 'playsInline', read: getAttribute('playsinline')},
1495
- {
1496
- name: 'pointer-events',
1497
- containerTagName: 'svg',
1498
- tagName: 'path',
1499
- read: getSVGAttribute('pointer-events'),
1500
- },
1501
- {
1502
- name: 'pointerEvents',
1503
- containerTagName: 'svg',
1504
- tagName: 'path',
1505
- read: getSVGAttribute('pointer-events'),
1506
- },
1507
- {
1508
- name: 'points',
1509
- read: getSVGProperty('points'),
1510
- containerTagName: 'svg',
1511
- tagName: 'polygon',
1512
- overrideStringValue: '350,75 379,161 469,161',
1513
- },
1514
- {
1515
- name: 'pointsAtX',
1516
- read: getSVGProperty('pointsAtX'),
1517
- containerTagName: 'svg',
1518
- tagName: 'feSpotLight',
1519
- },
1520
- {
1521
- name: 'pointsAtY',
1522
- read: getSVGProperty('pointsAtY'),
1523
- containerTagName: 'svg',
1524
- tagName: 'feSpotLight',
1525
- },
1526
- {
1527
- name: 'pointsAtZ',
1528
- read: getSVGProperty('pointsAtZ'),
1529
- containerTagName: 'svg',
1530
- tagName: 'feSpotLight',
1531
- },
1532
- {
1533
- name: 'poster',
1534
- tagName: 'video',
1535
- overrideStringValue: 'https://reactjs.com',
1536
- },
1537
- {name: 'prefix', read: getAttribute('prefix')},
1538
- {name: 'preload', tagName: 'video', overrideStringValue: 'none'},
1539
- {
1540
- name: 'preserveAlpha',
1541
- read: getSVGProperty('preserveAlpha'),
1542
- containerTagName: 'svg',
1543
- tagName: 'feConvolveMatrix',
1544
- },
1545
- {
1546
- name: 'preserveAspectRatio',
1547
- read: getSVGProperty('preserveAspectRatio'),
1548
- containerTagName: 'svg',
1549
- tagName: 'feImage',
1550
- overrideStringValue: 'xMinYMin slice',
1551
- },
1552
- {
1553
- name: 'primitiveUnits',
1554
- read: getSVGProperty('primitiveUnits'),
1555
- containerTagName: 'svg',
1556
- tagName: 'filter',
1557
- overrideStringValue: 'objectBoundingBox',
1558
- },
1559
- {name: 'profile', read: getAttribute('profile')},
1560
- {name: 'property', read: getAttribute('property')},
1561
- {name: 'props', read: getAttribute('props')},
1562
- {
1563
- name: 'r',
1564
- read: getSVGProperty('r'),
1565
- containerTagName: 'svg',
1566
- tagName: 'circle',
1567
- overrideStringValue: '10pt',
1568
- },
1569
- {name: 'radioGroup', tagName: 'command', read: getAttribute('radiogroup')},
1570
- {
1571
- name: 'radius',
1572
- read: getSVGAttribute('radius'),
1573
- containerTagName: 'svg',
1574
- tagName: 'feMorphology',
1575
- },
1576
- {name: 'readOnly', tagName: 'input'},
1577
- {name: 'referrerPolicy', tagName: 'iframe'},
1578
- {
1579
- name: 'refX',
1580
- read: getSVGProperty('refX'),
1581
- containerTagName: 'svg',
1582
- tagName: 'marker',
1583
- overrideStringValue: '5em',
1584
- },
1585
- {
1586
- name: 'refY',
1587
- read: getSVGProperty('refY'),
1588
- containerTagName: 'svg',
1589
- tagName: 'marker',
1590
- overrideStringValue: '6em',
1591
- },
1592
- {name: 'rel', tagName: 'a'},
1593
- {
1594
- name: 'rendering-intent',
1595
- read: getSVGAttribute('rendering-intent'),
1596
- containerTagName: 'svg',
1597
- tagName: 'color-profile',
1598
- },
1599
- {
1600
- name: 'renderingIntent',
1601
- read: getSVGAttribute('rendering-intent'),
1602
- containerTagName: 'svg',
1603
- tagName: 'color-profile',
1604
- },
1605
- {
1606
- name: 'repeatCount',
1607
- read: getSVGAttribute('repeatcount'),
1608
- containerTagName: 'svg',
1609
- tagName: 'animate',
1610
- },
1611
- {
1612
- name: 'repeatDur',
1613
- read: getSVGAttribute('repeatdur'),
1614
- containerTagName: 'svg',
1615
- tagName: 'animate',
1616
- },
1617
- {name: 'required', tagName: 'input'},
1618
- {
1619
- name: 'requiredExtensions',
1620
- read: getSVGProperty('requiredExtensions'),
1621
- containerTagName: 'svg',
1622
- tagName: 'a',
1623
- },
1624
- {
1625
- name: 'requiredFeatures',
1626
- read: getSVGAttribute('requiredFeatures'),
1627
- containerTagName: 'svg',
1628
- tagName: 'a',
1629
- },
1630
- {name: 'resource', read: getAttribute('resource')},
1631
- {
1632
- name: 'restart',
1633
- read: getSVGAttribute('resource'),
1634
- containerTagName: 'svg',
1635
- tagName: 'animate',
1636
- },
1637
- {
1638
- name: 'result',
1639
- read: getSVGProperty('result'),
1640
- containerTagName: 'svg',
1641
- tagName: 'feBlend',
1642
- },
1643
- {name: 'results', tagName: 'input', read: getAttribute('results')}, // TODO: Should use property but it's not supported in Chrome.
1644
- {name: 'reversed', tagName: 'ol'},
1645
- {name: 'role', read: getAttribute('role')},
1646
- {
1647
- name: 'rotate',
1648
- read: getSVGAttribute('role'),
1649
- containerTagName: 'svg',
1650
- tagName: 'altGlyph',
1651
- },
1652
- {name: 'rows', tagName: 'textarea'},
1653
- {name: 'rowSpan', containerTagName: 'tr', tagName: 'td'},
1654
- {
1655
- name: 'rx',
1656
- read: getSVGProperty('rx'),
1657
- containerTagName: 'svg',
1658
- tagName: 'ellipse',
1659
- overrideStringValue: '1px',
1660
- },
1661
- {
1662
- name: 'ry',
1663
- read: getSVGProperty('ry'),
1664
- containerTagName: 'svg',
1665
- tagName: 'ellipse',
1666
- overrideStringValue: '2px',
1667
- },
1668
- {
1669
- name: 'sandbox',
1670
- tagName: 'iframe',
1671
- overrideStringValue: 'allow-forms allow-scripts',
1672
- },
1673
- {
1674
- name: 'scale',
1675
- read: getSVGProperty('scale'),
1676
- containerTagName: 'svg',
1677
- tagName: 'feDisplacementMap',
1678
- },
1679
- {
1680
- name: 'scope',
1681
- containerTagName: 'tr',
1682
- tagName: 'th',
1683
- overrideStringValue: 'row',
1684
- },
1685
- {name: 'scoped', tagName: 'style', read: getAttribute('scoped')},
1686
- {name: 'scrolling', tagName: 'iframe', overrideStringValue: 'no'},
1687
- {name: 'seamless', tagName: 'iframe', read: getAttribute('seamless')},
1688
- {name: 'security', tagName: 'iframe', read: getAttribute('security')},
1689
- {
1690
- name: 'seed',
1691
- read: getSVGProperty('seed'),
1692
- containerTagName: 'svg',
1693
- tagName: 'feTurbulence',
1694
- },
1695
- {name: 'selected', tagName: 'option', containerTagName: 'select'},
1696
- {name: 'selectedIndex', tagName: 'select'},
1697
- {name: 'shape', tagName: 'a'},
1698
- {
1699
- name: 'shape-rendering',
1700
- tagName: 'svg',
1701
- read: getSVGAttribute('shape-rendering'),
1702
- },
1703
- {
1704
- name: 'shapeRendering',
1705
- tagName: 'svg',
1706
- read: getSVGAttribute('shape-rendering'),
1707
- },
1708
- {name: 'size', tagName: 'input'},
1709
- {name: 'sizes', tagName: 'link'},
1710
- {
1711
- name: 'slope',
1712
- read: getSVGAttribute('slope'),
1713
- containerTagName: 'svg',
1714
- tagName: 'font-face',
1715
- },
1716
- {
1717
- name: 'spacing',
1718
- read: getSVGProperty('spacing'),
1719
- containerTagName: 'svg',
1720
- tagName: 'textPath',
1721
- overrideStringValue: 'auto',
1722
- },
1723
- {name: 'span', containerTagName: 'colgroup', tagName: 'col'},
1724
- {
1725
- name: 'specularConstant',
1726
- read: getSVGProperty('specularConstant'),
1727
- containerTagName: 'svg',
1728
- tagName: 'feSpecularLighting',
1729
- },
1730
- {
1731
- name: 'specularExponent',
1732
- read: getSVGProperty('specularConstant'),
1733
- containerTagName: 'svg',
1734
- tagName: 'feSpecularLighting',
1735
- },
1736
- {name: 'speed', read: getAttribute('speed')},
1737
- {
1738
- name: 'spellCheck',
1739
- overrideStringValue: 'false',
1740
- tagName: 'input',
1741
- read: getProperty('spellcheck'),
1742
- },
1743
- {
1744
- name: 'spellcheck',
1745
- overrideStringValue: 'false',
1746
- tagName: 'input',
1747
- read: getProperty('spellcheck'),
1748
- },
1749
- {
1750
- name: 'spreadMethod',
1751
- read: getSVGProperty('spreadMethod'),
1752
- containerTagName: 'svg',
1753
- tagName: 'linearGradient',
1754
- overrideStringValue: 'reflect',
1755
- },
1756
- {name: 'src', tagName: 'img', overrideStringValue: 'https://reactjs.com'},
1757
- {
1758
- name: 'srcDoc',
1759
- tagName: 'iframe',
1760
- overrideStringValue: '<p>Hi</p>',
1761
- read: getProperty('srcdoc'),
1762
- },
1763
- {
1764
- name: 'srcdoc',
1765
- tagName: 'iframe',
1766
- overrideStringValue: '<p>Hi</p>',
1767
- read: getProperty('srcdoc'),
1768
- },
1769
- {
1770
- name: 'srcLang',
1771
- containerTagName: 'audio',
1772
- tagName: 'track',
1773
- overrideStringValue: 'en',
1774
- read: getProperty('srclang'),
1775
- },
1776
- {
1777
- name: 'srclang',
1778
- containerTagName: 'audio',
1779
- tagName: 'track',
1780
- overrideStringValue: 'en',
1781
- read: getProperty('srclang'),
1782
- },
1783
- {name: 'srcSet', tagName: 'img'},
1784
- {name: 'srcset', tagName: 'img'},
1785
- {name: 'start', tagName: 'ol'},
1786
- {
1787
- name: 'startOffset',
1788
- read: getSVGProperty('startOffset'),
1789
- containerTagName: 'svg',
1790
- tagName: 'textPath',
1791
- },
1792
- {name: 'state', read: getAttribute('state')},
1793
- {
1794
- name: 'stdDeviation',
1795
- read: getSVGAttribute('stdDeviation'),
1796
- containerTagName: 'svg',
1797
- tagName: 'feGaussianBlur',
1798
- },
1799
- {
1800
- name: 'stemh',
1801
- read: getSVGAttribute('stemh'),
1802
- containerTagName: 'svg',
1803
- tagName: 'font-face',
1804
- },
1805
- {
1806
- name: 'stemv',
1807
- read: getSVGAttribute('stemv'),
1808
- containerTagName: 'svg',
1809
- tagName: 'font-face',
1810
- },
1811
- {name: 'step', read: getAttribute('step')},
1812
- {
1813
- name: 'stitchTiles',
1814
- read: getSVGProperty('stitchTiles'),
1815
- containerTagName: 'svg',
1816
- tagName: 'feTurbulence',
1817
- overrideStringValue: 'stitch',
1818
- },
1819
- {
1820
- name: 'stop-color',
1821
- containerTagName: 'svg',
1822
- tagName: 'stop',
1823
- read: getSVGAttribute('stop-color'),
1824
- },
1825
- {
1826
- name: 'stop-opacity',
1827
- containerTagName: 'svg',
1828
- tagName: 'stop',
1829
- read: getSVGAttribute('stop-opacity'),
1830
- },
1831
- {
1832
- name: 'stopColor',
1833
- containerTagName: 'svg',
1834
- tagName: 'stop',
1835
- read: getSVGAttribute('stop-color'),
1836
- },
1837
- {
1838
- name: 'stopOpacity',
1839
- containerTagName: 'svg',
1840
- tagName: 'stop',
1841
- read: getSVGAttribute('stop-opacity'),
1842
- },
1843
- {
1844
- name: 'strikethrough-position',
1845
- read: getSVGAttribute('strikethrough-position'),
1846
- containerTagName: 'svg',
1847
- tagName: 'font-face',
1848
- },
1849
- {
1850
- name: 'strikethrough-thickness',
1851
- read: getSVGAttribute('strikethrough-thickness'),
1852
- containerTagName: 'svg',
1853
- tagName: 'font-face',
1854
- },
1855
- {
1856
- name: 'strikethroughPosition',
1857
- read: getSVGAttribute('strikethrough-position'),
1858
- containerTagName: 'svg',
1859
- tagName: 'font-face',
1860
- },
1861
- {
1862
- name: 'strikethroughThickness',
1863
- read: getSVGAttribute('strikethrough-thickness'),
1864
- containerTagName: 'svg',
1865
- tagName: 'font-face',
1866
- },
16
+const types = [
17
{
18
name: 'string',
1869
- read: getSVGAttribute('string'),
1870
- containerTagName: 'svg',
1871
- tagName: 'font-face-format',
1872
- },
1873
- {
1874
- name: 'stroke',
1875
- containerTagName: 'svg',
1876
- tagName: 'path',
1877
- read: getSVGAttribute('stroke'),
1878
- },
1879
- {
1880
- name: 'stroke-dasharray',
1881
- containerTagName: 'svg',
1882
- tagName: 'path',
1883
- read: getSVGAttribute('stroke-dasharray'),
1884
- },
1885
- {
1886
- name: 'stroke-Dasharray',
1887
- containerTagName: 'svg',
1888
- tagName: 'path',
1889
- read: getSVGAttribute('stroke-dasharray'),
1890
- },
1891
- {
1892
- name: 'stroke-dashoffset',
1893
- containerTagName: 'svg',
1894
- tagName: 'path',
1895
- read: getSVGAttribute('stroke-dashoffset'),
1896
- },
1897
- {
1898
- name: 'stroke-linecap',
1899
- containerTagName: 'svg',
1900
- tagName: 'path',
1901
- read: getSVGAttribute('stroke-linecap'),
1902
- },
1903
- {
1904
- name: 'stroke-linejoin',
1905
- containerTagName: 'svg',
1906
- tagName: 'path',
1907
- read: getSVGAttribute('stroke-linejoin'),
1908
- },
1909
- {
1910
- name: 'stroke-miterlimit',
1911
- containerTagName: 'svg',
1912
- tagName: 'path',
1913
- read: getSVGAttribute('stroke-miterlimit'),
1914
- },
1915
- {
1916
- name: 'stroke-opacity',
1917
- containerTagName: 'svg',
1918
- tagName: 'path',
1919
- read: getSVGAttribute('stroke-opacity'),
1920
- },
1921
- {
1922
- name: 'stroke-width',
1923
- containerTagName: 'svg',
1924
- tagName: 'path',
1925
- read: getSVGAttribute('stroke-width'),
1926
- },
1927
- {
1928
- name: 'strokeDasharray',
1929
- containerTagName: 'svg',
1930
- tagName: 'path',
1931
- read: getSVGAttribute('stroke-dasharray'),
1932
- },
1933
- {
1934
- name: 'strokeDashoffset',
1935
- containerTagName: 'svg',
1936
- tagName: 'path',
1937
- read: getSVGAttribute('stroke-dashoffset'),
1938
- },
1939
- {
1940
- name: 'strokeLinecap',
1941
- containerTagName: 'svg',
1942
- tagName: 'path',
1943
- read: getSVGAttribute('stroke-linecap'),
1944
- },
1945
- {
1946
- name: 'strokeLinejoin',
1947
- containerTagName: 'svg',
1948
- tagName: 'path',
1949
- read: getSVGAttribute('stroke-linejoin'),
1950
- },
1951
- {
1952
- name: 'strokeMiterlimit',
1953
- containerTagName: 'svg',
1954
- tagName: 'path',
1955
- read: getSVGAttribute('stroke-miterlimit'),
1956
- },
1957
- {
1958
- name: 'strokeOpacity',
1959
- containerTagName: 'svg',
1960
- tagName: 'path',
1961
- read: getSVGAttribute('stroke-opacity'),
1962
- },
1963
- {
1964
- name: 'strokeWidth',
1965
- containerTagName: 'svg',
1966
- tagName: 'path',
1967
- read: getSVGAttribute('stroke-width'),
1968
- },
1969
- {name: 'style'},
1970
- {name: 'summary', tagName: 'table'},
1971
- {
1972
- name: 'suppressContentEditableWarning',
1973
- read: getAttribute('suppresscontenteditablewarning'),
1974
- },
1975
- {
1976
- name: 'surfaceScale',
1977
- read: getSVGProperty('surfaceScale'),
1978
- containerTagName: 'svg',
1979
- tagName: 'feDiffuseLighting',
1980
- },
1981
- {
1982
- name: 'systemLanguage',
1983
- overrideStringValue: 'en',
1984
- read: getSVGProperty('systemLanguage'),
1985
- containerTagName: 'svg',
1986
- tagName: 'a',
1987
- },
1988
- {name: 'tabIndex'},
1989
- {
1990
- name: 'tableValues',
1991
- read: getSVGProperty('tableValues'),
1992
- containerTagName: 'svg',
1993
- tagName: 'feFuncA',
1994
- overrideStringValue: '0 1 2 3',
1995
- },
1996
- {
1997
- name: 'target',
1998
- read: getSVGProperty('target'),
1999
- containerTagName: 'svg',
2000
- tagName: 'a',
2001
- },
2002
- {
2003
- name: 'targetX',
2004
- read: getSVGProperty('targetX'),
2005
- containerTagName: 'svg',
2006
- tagName: 'feConvolveMatrix',
2007
- },
2008
- {
2009
- name: 'targetY',
2010
- read: getSVGProperty('targetY'),
2011
- containerTagName: 'svg',
2012
- tagName: 'feConvolveMatrix',
2013
- },
2014
- {
2015
- name: 'text-anchor',
2016
- containerTagName: 'svg',
2017
- tagName: 'text',
2018
- read: getSVGAttribute('text-anchor'),
2019
- },
2020
- {
2021
- name: 'text-decoration',
2022
- containerTagName: 'svg',
2023
- tagName: 'text',
2024
- read: getSVGAttribute('text-decoration'),
2025
- },
2026
- {
2027
- name: 'text-rendering',
2028
- tagName: 'svg',
2029
- read: getSVGAttribute('text-rendering'),
2030
- },
2031
- {
2032
- name: 'textAnchor',
2033
- containerTagName: 'svg',
2034
- tagName: 'text',
2035
- read: getSVGAttribute('text-anchor'),
2036
- },
2037
- {
2038
- name: 'textDecoration',
2039
- containerTagName: 'svg',
2040
- tagName: 'text',
2041
- read: getSVGAttribute('text-decoration'),
2042
- },
2043
- {
2044
- name: 'textLength',
2045
- read: getSVGProperty('textLength'),
2046
- containerTagName: 'svg',
2047
- tagName: 'text',
2048
- },
2049
- {
2050
- name: 'textRendering',
2051
- tagName: 'svg',
2052
- read: getSVGAttribute('text-rendering'),
2053
- },
2054
- {name: 'title'},
2055
- {
2056
- name: 'to',
2057
- read: getSVGAttribute('to'),
2058
- containerTagName: 'svg',
2059
- tagName: 'set',
2060
- },
2061
- {
2062
- name: 'transform',
2063
- read: getSVGProperty('transform'),
2064
- containerTagName: 'svg',
2065
- tagName: 'a',
2066
- overrideStringValue: 'translate(-10,-20) scale(2) rotate(45) translate(5,10)',
2067
- },
2068
- {name: 'type', tagName: 'button', overrideStringValue: 'reset'},
2069
- {
2070
- name: 'type',
2071
- containerTagName: 'svg',
2072
- tagName: 'feFuncA',
2073
- read: getSVGProperty('type'),
2074
- overrideStringValue: 'discrete',
2075
- },
2076
- {name: 'typeof', read: getAttribute('typeof')},
2077
- {
2078
- name: 'u1',
2079
- read: getSVGAttribute('u1'),
2080
- containerTagName: 'svg',
2081
- tagName: 'hkern',
2082
- },
2083
- {
2084
- name: 'u2',
2085
- read: getSVGAttribute('u2'),
2086
- containerTagName: 'svg',
2087
- tagName: 'hkern',
2088
- },
2089
- {
2090
- name: 'underline-position',
2091
- read: getSVGAttribute('underline-position'),
2092
- containerTagName: 'svg',
2093
- tagName: 'font-face',
2094
- },
2095
- {
2096
- name: 'underline-thickness',
2097
- read: getSVGAttribute('underline-thickness'),
2098
- containerTagName: 'svg',
2099
- tagName: 'font-face',
2100
- },
2101
- {
2102
- name: 'underlinePosition',
2103
- read: getSVGAttribute('underline-position'),
2104
- containerTagName: 'svg',
2105
- tagName: 'font-face',
2106
- },
2107
- {
2108
- name: 'underlineThickness',
2109
- read: getSVGAttribute('underline-thickness'),
2110
- containerTagName: 'svg',
2111
- tagName: 'font-face',
2112
- },
2113
- {
2114
- name: 'unicode',
2115
- read: getSVGAttribute('unicode'),
2116
- containerTagName: 'svg',
2117
- tagName: 'glyph',
2118
- },
2119
- {
2120
- name: 'unicode-bidi',
2121
- containerTagName: 'svg',
2122
- tagName: 'text',
2123
- read: getSVGAttribute('unicode-bidi'),
2124
- },
2125
- {
2126
- name: 'unicode-range',
2127
- read: getSVGAttribute('unicode-range'),
2128
- containerTagName: 'svg',
2129
- tagName: 'font-face',
2130
- },
2131
- {
2132
- name: 'unicodeBidi',
2133
- containerTagName: 'svg',
2134
- tagName: 'text',
2135
- read: getSVGAttribute('unicode-bidi'),
2136
- },
2137
- {
2138
- name: 'unicodeRange',
2139
- read: getSVGAttribute('unicode-range'),
2140
- containerTagName: 'svg',
2141
- tagName: 'font-face',
2142
- },
2143
- {
2144
- name: 'units-per-em',
2145
- read: getSVGAttribute('units-per-em'),
2146
- containerTagName: 'svg',
2147
- tagName: 'font-face',
2148
- },
2149
- {
2150
- name: 'unitsPerEm',
2151
- read: getSVGAttribute('unites-per-em'),
2152
- containerTagName: 'svg',
2153
- tagName: 'font-face',
2154
- },
2155
- {name: 'unknown', read: getAttribute('unknown')},
2156
- {
2157
- name: 'unselectable',
2158
- read: getAttribute('unselectable'),
2159
- tagName: 'span',
2160
- overrideStringValue: 'on',
2161
- },
2162
- {name: 'useMap', tagName: 'img'},
2163
- {
2164
- name: 'v-alphabetic',
2165
- read: getSVGAttribute('v-alphabetic'),
2166
- containerTagName: 'svg',
2167
- tagName: 'font-face',
2168
- },
2169
- {
2170
- name: 'v-hanging',
2171
- read: getSVGAttribute('v-hanging'),
2172
- containerTagName: 'svg',
2173
- tagName: 'font-face',
2174
- },
2175
- {
2176
- name: 'v-ideographic',
2177
- read: getSVGAttribute('v-ideographic'),
2178
- containerTagName: 'svg',
2179
- tagName: 'font-face',
2180
- },
2181
- {
2182
- name: 'v-mathematical',
2183
- read: getSVGAttribute('v-mathematical'),
2184
- containerTagName: 'svg',
2185
- tagName: 'font-face',
2186
- },
2187
- {
2188
- name: 'vAlphabetic',
2189
- read: getSVGAttribute('v-alphabetic'),
2190
- containerTagName: 'svg',
2191
- tagName: 'font-face',
2192
- },
2193
- {name: 'value', tagName: 'input'},
2194
- {name: 'value', tagName: 'input', type: 'email'},
2195
- {name: 'value', tagName: 'input', type: 'number'},
2196
- {name: 'value', tagName: 'textarea'},
2197
- {name: 'value', containerTagName: 'select', tagName: 'option'},
2198
- {
2199
- name: 'Value',
2200
- containerTagName: 'select',
2201
- tagName: 'option',
2202
- read: getProperty('value'),
2203
- },
2204
- {
2205
- name: 'values',
2206
- read: getSVGProperty('values'),
2207
- containerTagName: 'svg',
2208
- tagName: 'feColorMatrix',
2209
- overrideStringValue: '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0',
2210
- },
2211
- {
2212
- name: 'vector-effect',
2213
- containerTagName: 'svg',
2214
- tagName: 'line',
2215
- read: getSVGAttribute('vector-effect'),
2216
- },
2217
- {
2218
- name: 'vectorEffect',
2219
- containerTagName: 'svg',
2220
- tagName: 'line',
2221
- read: getSVGAttribute('vector-effect'),
2222
- },
2223
- {name: 'version', containerTagName: 'document', tagName: 'html'},
2224
- {name: 'version', tagName: 'svg', read: getSVGAttribute('version')},
2225
- {
2226
- name: 'vert-adv-y',
2227
- read: getSVGAttribute('vert-origin-y'),
2228
- containerTagName: 'svg',
2229
- tagName: 'font',
2230
- },
2231
- {
2232
- name: 'vert-origin-x',
2233
- read: getSVGAttribute('vert-origin-y'),
2234
- containerTagName: 'svg',
2235
- tagName: 'font',
2236
- },
2237
- {
2238
- name: 'vert-origin-y',
2239
- read: getSVGAttribute('vert-origin-y'),
2240
- containerTagName: 'svg',
2241
- tagName: 'font',
2242
- },
2243
- {
2244
- name: 'vertAdvY',
2245
- read: getSVGAttribute('vert-adv-y'),
2246
- containerTagName: 'svg',
2247
- tagName: 'font',
2248
- },
2249
- {
2250
- name: 'vertOriginX',
2251
- read: getSVGAttribute('vert-origin-x'),
2252
- containerTagName: 'svg',
2253
- tagName: 'font',
2254
- },
2255
- {
2256
- name: 'vertOriginY',
2257
- read: getSVGAttribute('vert-origin-y'),
2258
- containerTagName: 'svg',
2259
- tagName: 'font',
2260
- },
2261
- {
2262
- name: 'vHanging',
2263
- read: getSVGAttribute('v-hanging'),
2264
- containerTagName: 'svg',
2265
- tagName: 'font-face',
2266
- },
2267
- {
2268
- name: 'vIdeographic',
2269
- read: getSVGAttribute('v-ideographic'),
2270
- containerTagName: 'svg',
2271
- tagName: 'font-face',
2272
- },
2273
- {
2274
- name: 'viewBox',
2275
- read: getSVGProperty('viewBox'),
2276
- containerTagName: 'svg',
2277
- tagName: 'marker',
2278
- overrideStringValue: '0 0 1500 1000',
19
+ testValue: 'a string',
20
+ testDisplayValue: "'a string'",
21
},
22
{
2281
- name: 'viewTarget',
2282
- read: getSVGAttribute('viewTarget'),
2283
- containerTagName: 'svg',
2284
- tagName: 'view',
23
+ name: 'empty string',
24
+ testValue: '',
25
+ testDisplayValue: "''",
26
},
2286
- {name: 'visibility', read: getAttribute('visibility')},
27
{
2288
- name: 'visibility',
2289
- containerTagName: 'svg',
2290
- tagName: 'path',
2291
- read: getSVGAttribute('visibility'),
28
+ name: 'array with string',
29
+ testValue: ['string'],
30
+ testDisplayValue: "['string']",
31
},
32
{
2294
- name: 'vMathematical',
2295
- read: getSVGAttribute('v-mathematical'),
2296
- containerTagName: 'svg',
2297
- tagName: 'font-face',
33
+ name: 'empty array',
34
+ testValue: [],
35
+ testDisplayValue: '[]',
36
},
2299
- {name: 'vocab', read: getAttribute('vocab')},
2300
- {name: 'width', tagName: 'img'},
37
{
2302
- name: 'width',
2303
- containerTagName: 'svg',
2304
- tagName: 'rect',
2305
- read: getSVGProperty('width'),
38
+ name: 'object',
39
+ testValue: {
40
+ toString() {
41
+ return 'result of toString()';
42
+ },
43
+ },
44
+ testDisplayValue: "{ toString() { return 'result of toString()'; } }",
45
},
46
{
2308
- name: 'widths',
2309
- read: getSVGAttribute('widths'),
2310
- containerTagName: 'svg',
2311
- tagName: 'font-face',
47
+ name: 'numeric string',
48
+ testValue: '42',
49
+ displayValue: "'42'",
50
},
2313
- {name: 'wmode', read: getAttribute('wmode'), tagName: 'embed'},
51
{
2315
- name: 'word-spacing',
2316
- containerTagName: 'svg',
2317
- tagName: 'text',
2318
- read: getSVGAttribute('word-spacing'),
52
+ name: '-1',
53
+ testValue: -1,
54
},
55
{
2321
- name: 'wordSpacing',
2322
- containerTagName: 'svg',
2323
- tagName: 'text',
2324
- read: getSVGAttribute('word-spacing'),
56
+ name: '0',
57
+ testValue: 0,
58
},
2326
- {name: 'wrap', tagName: 'textarea'},
59
{
2328
- name: 'writing-mode',
2329
- containerTagName: 'svg',
2330
- tagName: 'text',
2331
- read: getSVGAttribute('writing-mode'),
60
+ name: 'integer',
61
+ testValue: 1,
62
},
63
{
2334
- name: 'writingMode',
2335
- containerTagName: 'svg',
2336
- tagName: 'text',
2337
- read: getSVGAttribute('writing-mode'),
64
+ name: 'NaN',
65
+ testValue: NaN,
66
},
67
{
2340
- name: 'x',
2341
- read: getSVGAttribute('x'),
2342
- containerTagName: 'svg',
2343
- tagName: 'altGlyph',
68
+ name: 'float',
69
+ testValue: 99.99,
70
},
71
{
2346
- name: 'x-height',
2347
- read: getSVGAttribute('x-height'),
2348
- containerTagName: 'svg',
2349
- tagName: 'font-face',
72
+ name: 'true',
73
+ testValue: true,
74
},
75
{
2352
- name: 'x1',
2353
- read: getSVGProperty('x1'),
2354
- containerTagName: 'svg',
2355
- tagName: 'line',
76
+ name: 'false',
77
+ testValue: false,
78
},
79
{
2358
- name: 'x2',
2359
- read: getSVGProperty('x2'),
2360
- containerTagName: 'svg',
2361
- tagName: 'line',
80
+ name: "string 'true'",
81
+ testValue: 'true',
82
+ displayValue: "'true'",
83
},
84
{
2364
- name: 'xChannelSelector',
2365
- read: getSVGProperty('xChannelSelector'),
2366
- containerTagName: 'svg',
2367
- tagName: 'feDisplacementMap',
2368
- overrideStringValue: 'R',
85
+ name: "string 'false'",
86
+ testValue: 'false',
87
+ displayValue: "'false'",
88
},
89
{
2371
- name: 'xHeight',
2372
- read: getSVGAttribute('x-height'),
2373
- containerTagName: 'svg',
2374
- tagName: 'font-face',
90
+ name: "string 'on'",
91
+ testValue: 'on',
92
+ displayValue: "'on'",
93
},
2376
- {name: 'XLink:Actuate', read: getAttribute('XLink:Actuate')},
2377
- {name: 'xlink:actuate', read: getAttribute('xlink:actuate')},
2378
- {name: 'xlink:arcrole', read: getAttribute('xlink:arcrole')},
2379
- {name: 'xlink:href', read: getAttribute('xlink:href')},
2380
- {name: 'xlink:role', read: getAttribute('xlink:role')},
2381
- {name: 'xlink:show', read: getAttribute('xlink:show')},
2382
- {name: 'xlink:title', read: getAttribute('xlink:title')},
2383
- {name: 'xlink:type', read: getAttribute('xlink:type')},
2384
- {name: 'xlinkActuate', read: getAttribute('xlink:actuate')},
2385
- {name: 'XlinkActuate', read: getAttribute('Xlink:actuate')},
2386
- {name: 'xlinkArcrole', read: getAttribute('xlink:arcrole')},
2387
- {name: 'xlinkHref', read: getAttribute('xlink:href')},
2388
- {name: 'xlinkRole', read: getAttribute('xlink:role')},
2389
- {name: 'xlinkShow', read: getAttribute('xlink:show')},
2390
- {name: 'xlinkTitle', read: getAttribute('xlink:title')},
2391
- {name: 'xlinkType', read: getAttribute('xlink:type')},
2392
- {name: 'xml:base', read: getAttribute('xml:base')},
2393
- {name: 'xml:lang', read: getAttribute('xml:lang')},
2394
- {name: 'xml:space', read: getAttribute('xml:space')},
2395
- {name: 'xmlBase', read: getAttribute('xml:base')},
2396
- {name: 'xmlLang', read: getAttribute('xml:lang')},
2397
- {name: 'xmlns', read: getProperty('namespaceURI'), tagName: 'svg'},
2398
- {name: 'xmlns:xlink', read: getAttribute('xmlns:xlink')},
2399
- {name: 'xmlnsXlink', read: getAttribute('xmlns:xlink')},
2400
- {name: 'xmlSpace', read: getAttribute('xml:space')},
94
{
2402
- name: 'y',
2403
- read: getSVGAttribute('y'),
2404
- containerTagName: 'svg',
2405
- tagName: 'altGlyph',
95
+ name: "string 'off'",
96
+ testValue: 'off',
97
+ displayValue: "'off'",
98
},
99
{
2408
- name: 'y1',
2409
- read: getSVGProperty('y1'),
2410
- containerTagName: 'svg',
2411
- tagName: 'line',
100
+ name: 'symbol',
101
+ testValue: Symbol('foo'),
102
+ testDisplayValue: "Symbol('foo')",
103
},
104
{
2414
- name: 'y2',
2415
- read: getSVGProperty('y2'),
2416
- containerTagName: 'svg',
2417
- tagName: 'line',
105
+ name: 'function',
106
+ testValue: function f() {},
107
},
108
{
2420
- name: 'yChannelSelector',
2421
- read: getSVGProperty('yChannelSelector'),
2422
- containerTagName: 'svg',
2423
- tagName: 'feDisplacementMap',
2424
- overrideStringValue: 'B',
109
+ name: 'null',
110
+ testValue: null,
111
},
112
{
2427
- name: 'z',
2428
- read: getSVGProperty('z'),
2429
- containerTagName: 'svg',
2430
- tagName: 'fePointLight',
113
+ name: 'undefined',
114
+ testValue: undefined,
115
},
2432
- {name: 'zoomAndPan', read: getSVGProperty('zoomAndPan'), tagName: 'svg'},
116
];
117
118
const ALPHABETICAL = 'alphabetical';
@@ -2531,7 +214,13 @@ function warn(str) {
214
_didWarn = true;
215
}
216
const UNKNOWN_HTML_TAGS = new Set(['keygen', 'time', 'command']);
2534
-function getRenderedAttributeValue(renderer, serverRenderer, attribute, type) {
217
+function getRenderedAttributeValue(
218
+ react,
219
+ renderer,
220
+ serverRenderer,
221
+ attribute,
222
+ type
223
+) {
224
const originalConsoleError = console.error;
225
console.error = warn;
226
@@ -2547,9 +236,8 @@ function getRenderedAttributeValue(renderer, serverRenderer, attribute, type) {
236
return document.createElement(containerTagName);
237
}
238
}
2550
- let container = createContainer();
239
2552
- const read = attribute.read || getProperty(attribute.name);
240
+ const read = attribute.read;
241
let testValue = type.testValue;
242
if (attribute.overrideStringValue !== undefined) {
243
switch (type.name) {
@@ -2563,7 +251,9 @@ function getRenderedAttributeValue(renderer, serverRenderer, attribute, type) {
251
break;
252
}
253
}
2566
- let baseProps = {};
254
+ let baseProps = {
255
+ ...attribute.extraProps,
256
+ };
257
if (attribute.type) {
258
baseProps.type = attribute.type;
259
}
@@ -2585,10 +275,13 @@ function getRenderedAttributeValue(renderer, serverRenderer, attribute, type) {
275
276
_didWarn = false;
277
try {
2588
- renderer.render(React.createElement(tagName, baseProps), container);
278
+ let container = createContainer();
279
+ renderer.render(react.createElement(tagName, baseProps), container);
280
defaultValue = read(container.firstChild);
281
canonicalDefaultValue = getCanonicalizedValue(defaultValue);
2591
- renderer.render(React.createElement(tagName, props), container);
282
+
283
+ container = createContainer();
284
+ renderer.render(react.createElement(tagName, props), container);
285
result = read(container.firstChild);
286
canonicalResult = getCanonicalizedValue(result);
287
didWarn = _didWarn;
@@ -2603,18 +296,19 @@ function getRenderedAttributeValue(renderer, serverRenderer, attribute, type) {
296
let hasTagMismatch = false;
297
let hasUnknownElement = false;
298
try {
299
+ let container;
300
if (containerTagName === 'document') {
301
const html = serverRenderer.renderToString(
2608
- React.createElement(tagName, props)
302
+ react.createElement(tagName, props)
303
);
304
container = createContainer();
305
container.innerHTML = html;
306
} else {
307
const html = serverRenderer.renderToString(
2614
- React.createElement(
308
+ react.createElement(
309
containerTagName,
310
null,
2617
- React.createElement(tagName, props)
311
+ react.createElement(tagName, props)
312
)
313
);
314
const outerContainer = document.createElement('div');
@@ -2689,87 +383,104 @@ function getRenderedAttributeValue(renderer, serverRenderer, attribute, type) {
383
};
384
}
385
2692
-function getRenderedAttributeValues(attribute, type) {
2693
- const react15Value = getRenderedAttributeValue(
2694
- ReactDOM15,
2695
- ReactDOMServer15,
2696
- attribute,
2697
- type
2698
- );
2699
- const react16Value = getRenderedAttributeValue(
2700
- ReactDOM16,
2701
- ReactDOMServer16,
2702
- attribute,
2703
- type
2704
- );
386
+function prepareState(initGlobals) {
387
+ function getRenderedAttributeValues(attribute, type) {
388
+ const {
389
+ ReactStable,
390
+ ReactDOMStable,
391
+ ReactDOMServerStable,
392
+ ReactNext,
393
+ ReactDOMNext,
394
+ ReactDOMServerNext,
395
+ } = initGlobals(attribute, type);
396
+ const reactStableValue = getRenderedAttributeValue(
397
+ ReactStable,
398
+ ReactDOMStable,
399
+ ReactDOMServerStable,
400
+ attribute,
401
+ type
402
+ );
403
+ const reactNextValue = getRenderedAttributeValue(
404
+ ReactNext,
405
+ ReactDOMNext,
406
+ ReactDOMServerNext,
407
+ attribute,
408
+ type
409
+ );
410
2706
- let hasSameBehavior;
2707
- if (react15Value.didError && react16Value.didError) {
2708
- hasSameBehavior = true;
2709
- } else if (!react15Value.didError && !react16Value.didError) {
2710
- hasSameBehavior =
2711
- react15Value.didWarn === react16Value.didWarn &&
2712
- react15Value.canonicalResult === react16Value.canonicalResult &&
2713
- react15Value.ssrHasSameBehavior === react16Value.ssrHasSameBehavior;
2714
- } else {
2715
- hasSameBehavior = false;
2716
- }
411
+ let hasSameBehavior;
412
+ if (reactStableValue.didError && reactNextValue.didError) {
413
+ hasSameBehavior = true;
414
+ } else if (!reactStableValue.didError && !reactNextValue.didError) {
415
+ hasSameBehavior =
416
+ reactStableValue.didWarn === reactNextValue.didWarn &&
417
+ reactStableValue.canonicalResult === reactNextValue.canonicalResult &&
418
+ reactStableValue.ssrHasSameBehavior ===
419
+ reactNextValue.ssrHasSameBehavior;
420
+ } else {
421
+ hasSameBehavior = false;
422
+ }
423
2718
- return {
2719
- react15: react15Value,
2720
- react16: react16Value,
2721
- hasSameBehavior,
2722
- };
2723
-}
424
+ return {
425
+ reactStable: reactStableValue,
426
+ reactNext: reactNextValue,
427
+ hasSameBehavior,
428
+ };
429
+ }
430
2725
-const table = new Map();
2726
-const rowPatternHashes = new Map();
2727
-
2728
-// Disable error overlay while testing each attribute
2729
-uninjectErrorOverlay();
2730
-for (let attribute of attributes) {
2731
- const results = new Map();
2732
- let hasSameBehaviorForAll = true;
2733
- let rowPatternHash = '';
2734
- for (let type of types) {
2735
- const result = getRenderedAttributeValues(attribute, type);
2736
- results.set(type.name, result);
2737
- if (!result.hasSameBehavior) {
2738
- hasSameBehaviorForAll = false;
431
+ const table = new Map();
432
+ const rowPatternHashes = new Map();
433
+
434
+ // Disable error overlay while testing each attribute
435
+ uninjectErrorOverlay();
436
+ for (let attribute of attributes) {
437
+ const results = new Map();
438
+ let hasSameBehaviorForAll = true;
439
+ let rowPatternHash = '';
440
+ for (let type of types) {
441
+ const result = getRenderedAttributeValues(attribute, type);
442
+ results.set(type.name, result);
443
+ if (!result.hasSameBehavior) {
444
+ hasSameBehaviorForAll = false;
445
+ }
446
+ rowPatternHash += [result.reactStable, result.reactNext]
447
+ .map(res =>
448
+ [
449
+ res.canonicalResult,
450
+ res.canonicalDefaultValue,
451
+ res.didWarn,
452
+ res.didError,
453
+ ].join('||')
454
+ )
455
+ .join('||');
456
}
2740
- rowPatternHash += [result.react15, result.react16]
2741
- .map(res =>
2742
- [
2743
- res.canonicalResult,
2744
- res.canonicalDefaultValue,
2745
- res.didWarn,
2746
- res.didError,
2747
- ].join('||')
2748
- )
2749
- .join('||');
457
+ const row = {
458
+ results,
459
+ hasSameBehaviorForAll,
460
+ rowPatternHash,
461
+ // "Good enough" id that we can store in localStorage
462
+ rowIdHash: `${attribute.name} ${attribute.tagName} ${attribute.overrideStringValue}`,
463
+ };
464
+ const rowGroup = rowPatternHashes.get(rowPatternHash) || new Set();
465
+ rowGroup.add(row);
466
+ rowPatternHashes.set(rowPatternHash, rowGroup);
467
+ table.set(attribute, row);
468
}
2751
- const row = {
2752
- results,
2753
- hasSameBehaviorForAll,
2754
- rowPatternHash,
2755
- // "Good enough" id that we can store in localStorage
2756
- rowIdHash: `${attribute.name} ${attribute.tagName} ${attribute.overrideStringValue}`,
469
+
470
+ // Renable error overlay
471
+ injectErrorOverlay();
472
+
473
+ return {
474
+ table,
475
+ rowPatternHashes,
476
};
2758
- const rowGroup = rowPatternHashes.get(rowPatternHash) || new Set();
2759
- rowGroup.add(row);
2760
- rowPatternHashes.set(rowPatternHash, rowGroup);
2761
- table.set(attribute, row);
477
}
478
2764
-// Renable error overlay
2765
-injectErrorOverlay();
2766
-
479
const successColor = 'white';
480
const warnColor = 'yellow';
481
const errorColor = 'red';
482
483
function RendererResult({
2772
- version,
484
result,
485
canonicalResult,
486
defaultValue,
@@ -2816,8 +527,8 @@ function ResultPopover(props) {
527
}}>
528
{JSON.stringify(
529
{
2819
- react15: props.react15,
2820
- react16: props.react16,
530
+ reactStable: props.reactStable,
531
+ reactNext: props.reactNext,
532
hasSameBehavior: props.hasSameBehavior,
533
},
534
null,
@@ -2851,7 +562,7 @@ class Result extends React.Component {
562
}
563
564
render() {
2854
- const {react15, react16, hasSameBehavior} = this.props;
565
+ const {reactStable, reactNext, hasSameBehavior} = this.props;
566
const style = {
567
position: 'absolute',
568
width: '100%',
@@ -2895,7 +606,7 @@ class Result extends React.Component {
606
onMouseEnter={this.onMouseEnter}
607
onMouseLeave={this.onMouseLeave}>
608
<div css={{position: 'absolute', width: '50%', height: '100%'}}>
2898
- <RendererResult version={15} {...react15} />
609
+ <RendererResult {...reactStable} />
610
</div>
611
<div
612
css={{
@@ -2904,7 +615,7 @@ class Result extends React.Component {
615
left: '50%',
616
height: '100%',
617
}}>
2907
- <RendererResult version={16} {...react16} />
618
+ <RendererResult {...reactNext} />
619
</div>
620
{highlight}
621
{popover}
@@ -2938,8 +649,8 @@ function RowHeader({children, checked, onChange}) {
649
display: 'flex',
650
alignItems: 'center',
651
}}>
2941
- {children}
652
<input type="checkbox" checked={checked} onChange={onChange} />
653
+ {children}
654
</div>
655
);
656
}
@@ -2951,6 +662,7 @@ function CellContent(props) {
662
attributesInSortedOrder,
663
completedHashes,
664
toggleAttribute,
665
+ table,
666
} = props;
667
const attribute = attributesInSortedOrder[rowIndex - 1];
668
const type = types[columnIndex - 1];
@@ -2996,11 +708,13 @@ function restoreFromLocalStorage() {
708
return new Set();
709
}
710
2999
-class App extends Component {
711
+class App extends React.Component {
712
state = {
713
sortOrder: ALPHABETICAL,
714
filter: ALL,
715
completedHashes: restoreFromLocalStorage(),
716
+ table: null,
717
+ rowPatternHashes: null,
718
};
719
720
renderCell = props => {
@@ -3009,6 +723,7 @@ class App extends Component {
723
<CellContent
724
toggleAttribute={this.toggleAttribute}
725
completedHashes={this.state.completedHashes}
726
+ table={this.state.table}
727
attributesInSortedOrder={this.attributes}
728
{...props}
729
/>
@@ -3034,29 +749,80 @@ class App extends Component {
749
this.setState({completedHashes}, () => saveToLocalStorage(completedHashes));
750
};
751
3037
- componentWillMount() {
3038
- this.attributes = this.getAttributes(
3039
- this.state.sortOrder,
3040
- this.state.filter
752
+ async componentDidMount() {
753
+ const sources = {
754
+ ReactStable: 'https://unpkg.com/react@latest/dist/react.js',
755
+ ReactDOMStable: 'https://unpkg.com/react-dom@latest/dist/react-dom.js',
756
+ ReactDOMServerStable: 'https://unpkg.com/react-dom@latest/dist/react-dom-server.js',
757
+ ReactNext: '/react.development.js',
758
+ ReactDOMNext: '/react-dom.development.js',
759
+ ReactDOMServerNext: '/react-dom-server.browser.development.js',
760
+ };
761
+ const codePromises = Object.values(sources).map(src =>
762
+ fetch(src).then(res => res.text())
763
);
764
+ const codesByIndex = await Promise.all(codePromises);
765
+
766
+ const pool = [];
767
+ function initGlobals(attribute, type) {
768
+ document.title = `${attribute.name} (${type.name})`;
769
+
770
+ // Creating globals for every single test is too slow.
771
+ // However caching them between runs won't work for the same attribute names
772
+ // because warnings will be deduplicated. As a result, we only share globals
773
+ // between different attribute names.
774
+ for (let i = 0; i < pool.length; i++) {
775
+ if (!pool[i].testedAttributes.has(attribute.name)) {
776
+ pool[i].testedAttributes.add(attribute.name);
777
+ return pool[i].globals;
778
+ }
779
+ }
780
+
781
+ let globals = {};
782
+ Object.keys(sources).forEach((name, i) => {
783
+ eval.call(window, codesByIndex[i]); // eslint-disable-line
784
+ globals[name] = window[name.replace(/Stable|Next/g, '')];
785
+ });
786
+
787
+ // Cache for future use (for different attributes).
788
+ pool.push({
789
+ globals,
790
+ testedAttributes: new Set([attribute.name]),
791
+ });
792
+
793
+ return globals;
794
+ }
795
+
796
+ const {table, rowPatternHashes} = prepareState(initGlobals);
797
+ document.title = 'Ready';
798
+
799
+ this.setState({
800
+ table,
801
+ rowPatternHashes,
802
+ });
803
}
804
805
componentWillUpdate(nextProps, nextState) {
806
if (
807
nextState.sortOrder !== this.state.sortOrder ||
808
nextState.filter !== this.state.filter ||
3048
- nextState.completedHashes !== this.state.completedHashes
809
+ nextState.completedHashes !== this.state.completedHashes ||
810
+ nextState.table !== this.state.table
811
) {
812
this.attributes = this.getAttributes(
813
+ nextState.table,
814
+ nextState.rowPatternHashes,
815
nextState.sortOrder,
816
nextState.filter,
817
nextState.completedHashes
818
);
3055
- this.grid.forceUpdateGrids();
819
+ if (this.grid) {
820
+ this.grid.forceUpdateGrids();
821
+ }
822
}
823
}
824
3059
- getAttributes(sortOrder, filter, completedHashes) {
825
+ getAttributes(table, rowPatternHashes, sortOrder, filter, completedHashes) {
826
// Filter
827
let filteredAttributes;
828
switch (filter) {
@@ -3083,11 +849,13 @@ class App extends Component {
849
switch (sortOrder) {
850
case ALPHABETICAL:
851
return filteredAttributes.sort(
3086
- (attr1, attr2) => (attr1.name < attr2.name ? -1 : 1)
852
+ (attr1, attr2) =>
853
+ (attr1.name.toLowerCase() < attr2.name.toLowerCase() ? -1 : 1)
854
);
855
case REV_ALPHABETICAL:
856
return filteredAttributes.sort(
3090
- (attr1, attr2) => (attr1.name < attr2.name ? 1 : -1)
857
+ (attr1, attr2) =>
858
+ (attr1.name.toLowerCase() < attr2.name.toLowerCase() ? 1 : -1)
859
);
860
case GROUPED_BY_ROW_PATTERN: {
861
return filteredAttributes.sort((attr1, attr2) => {
@@ -3105,7 +873,62 @@ class App extends Component {
873
}
874
}
875
876
+ handleSaveClick = () => {
877
+ let log = '';
878
+ for (let attribute of attributes) {
879
+ const attributeResults = this.state.table.get(attribute).results;
880
+ log += `<${attribute.tagName || 'div'} ${attribute.name}>\n`;
881
+ for (let type of types) {
882
+ const {
883
+ didError,
884
+ didWarn,
885
+ canonicalResult,
886
+ canonicalDefaultValue,
887
+ ssrDidError,
888
+ ssrHasSameBehavior,
889
+ ssrHasSameBehaviorExceptWarnings,
890
+ } = attributeResults.get(type.name).reactNext;
891
+
892
+ let descriptions = [];
893
+ if (canonicalResult === canonicalDefaultValue) {
894
+ descriptions.push('IGNORED');
895
+ }
896
+ if (didError) {
897
+ descriptions.push('ERROR');
898
+ }
899
+ if (didWarn) {
900
+ descriptions.push('WARN');
901
+ }
902
+
903
+ if (ssrDidError) {
904
+ descriptions.push('SSR ERROR');
905
+ }
906
+
907
+ if (!ssrHasSameBehavior) {
908
+ if (ssrHasSameBehaviorExceptWarnings) {
909
+ descriptions.push('SSR WARNS');
910
+ } else {
911
+ descriptions.push('SSR DEVIATION');
912
+ }
913
+ }
914
+
915
+ log += `\t${type.name} -> ${canonicalResult} ${descriptions.join(', ')}\n`;
916
+ }
917
+ }
918
+
919
+ const blob = new Blob([log], {type: 'text/plain;charset=utf-8'});
920
+ FileSaver.saveAs(blob, 'AttributeTableSnapshot.txt');
921
+ };
922
+
923
render() {
924
+ if (!this.state.table) {
925
+ return (
926
+ <div>
927
+ <h1>Loading...</h1>
928
+ <h3>The progress is reported in the window title.</h3>
929
+ </div>
930
+ );
931
+ }
932
return (
933
<div>
934
<div>
@@ -3141,6 +964,12 @@ class App extends Component {
964
complete
965
</option>
966
</select>
967
+ <a
968
+ href="#"
969
+ style={{marginLeft: '10px'}}
970
+ onClick={this.handleSaveClick}>
971
+ Save latest results to a file 💾
972
+ </a>
973
</div>
974
<AutoSizer disableHeight={true}>
975
{({width}) => (
fixtures/attribute-behavior/src/attributes.js
new
+2327
@@ -0,0 +1,2327 @@
1
+function getProperty(propertyName) {
2
+ return el => el[propertyName];
3
+}
4
+
5
+function getAttribute(attributeName) {
6
+ return el => {
7
+ if (el.namespaceURI === '') {
8
+ throw new Error('Not an HTML element.');
9
+ }
10
+ return el.getAttribute(attributeName);
11
+ };
12
+}
13
+
14
+function getSVGProperty(propertyName) {
15
+ return el => el[propertyName];
16
+}
17
+
18
+function getSVGAttribute(attributeName) {
19
+ return el => {
20
+ if (el.namespaceURI !== 'http://www.w3.org/2000/svg') {
21
+ throw new Error('Not an SVG element.');
22
+ }
23
+ return el.getAttribute(attributeName);
24
+ };
25
+}
26
+
27
+const attributes = [
28
+ {name: 'about', read: getAttribute('about')},
29
+ {name: 'aBoUt', read: getAttribute('about')},
30
+ {
31
+ name: 'accent-Height',
32
+ containerTagName: 'svg',
33
+ tagName: 'font-face',
34
+ read: getSVGAttribute('accent-height'),
35
+ },
36
+ {
37
+ name: 'accent-height',
38
+ containerTagName: 'svg',
39
+ tagName: 'font-face',
40
+ read: getSVGAttribute('accent-height'),
41
+ },
42
+ {
43
+ name: 'accentHeight',
44
+ containerTagName: 'svg',
45
+ tagName: 'font-face',
46
+ read: getSVGAttribute('accent-height'),
47
+ },
48
+ {name: 'accept', tagName: 'input'},
49
+ {name: 'accept-charset', tagName: 'form', read: getProperty('acceptCharset')},
50
+ {name: 'accept-Charset', tagName: 'form', read: getProperty('acceptCharset')},
51
+ {name: 'acceptCharset', tagName: 'form'},
52
+ {name: 'accessKey'},
53
+ {
54
+ name: 'accumulate',
55
+ containerTagName: 'svg',
56
+ tagName: 'animate',
57
+ read: getSVGAttribute('accumulate'),
58
+ },
59
+ {name: 'action', tagName: 'form', overrideStringValue: 'https://reactjs.com'},
60
+ {
61
+ name: 'additive',
62
+ containerTagName: 'svg',
63
+ tagName: 'animate',
64
+ read: getSVGAttribute('additive'),
65
+ },
66
+ {
67
+ name: 'alignment-baseline',
68
+ containerTagName: 'svg',
69
+ tagName: 'textPath',
70
+ read: getSVGAttribute('alignment-baseline'),
71
+ },
72
+ {
73
+ name: 'alignmentBaseline',
74
+ containerTagName: 'svg',
75
+ tagName: 'textPath',
76
+ read: getSVGAttribute('alignment-baseline'),
77
+ },
78
+ {
79
+ name: 'allowFullScreen',
80
+ tagName: 'iframe',
81
+ read: getProperty('allowFullscreen'),
82
+ },
83
+ {
84
+ name: 'allowfullscreen',
85
+ tagName: 'iframe',
86
+ read: getProperty('allowFullscreen'),
87
+ },
88
+ {name: 'allowFullscreen', tagName: 'iframe'},
89
+ {
90
+ name: 'allowReorder',
91
+ containerTagName: 'svg',
92
+ tagName: 'switch',
93
+ read: getSVGAttribute('allowReorder'),
94
+ },
95
+ {
96
+ name: 'allowTransparency',
97
+ containerTagName: 'svg',
98
+ tagName: 'path',
99
+ read: getSVGAttribute('allowtransparency'),
100
+ },
101
+ {
102
+ name: 'alphabetic',
103
+ containerTagName: 'svg',
104
+ tagName: 'font-face',
105
+ read: getSVGAttribute('alphabetic'),
106
+ },
107
+ {name: 'alt', tagName: 'img'},
108
+ {
109
+ name: 'amplitude',
110
+ containerTagName: 'svg',
111
+ tagName: 'feFuncA',
112
+ read: getSVGProperty('amplitude'),
113
+ },
114
+ {
115
+ name: 'arabic-form',
116
+ containerTagName: 'svg',
117
+ tagName: 'glyph',
118
+ read: getSVGAttribute('arabic-form'),
119
+ },
120
+ {
121
+ name: 'arabicForm',
122
+ containerTagName: 'svg',
123
+ tagName: 'glyph',
124
+ read: getSVGAttribute('arabic-form'),
125
+ },
126
+ {name: 'aria', read: getAttribute('aria')},
127
+ {name: 'aria-', read: getAttribute('aria-')},
128
+ {name: 'aria-invalidattribute', read: getAttribute('aria-invalidattribute')},
129
+ {name: 'as', tagName: 'link'},
130
+ {
131
+ name: 'ascent',
132
+ containerTagName: 'svg',
133
+ tagName: 'font-face',
134
+ read: getSVGAttribute('ascent'),
135
+ },
136
+ {name: 'async', tagName: 'script'},
137
+ {
138
+ name: 'attributeName',
139
+ containerTagName: 'svg',
140
+ tagName: 'animate',
141
+ read: getSVGAttribute('attributeName'),
142
+ },
143
+ {
144
+ name: 'attributeType',
145
+ containerTagName: 'svg',
146
+ tagName: 'animate',
147
+ read: getSVGAttribute('attributeType'),
148
+ },
149
+ {
150
+ name: 'autoCapitalize',
151
+ tagName: 'input',
152
+ read: getProperty('autocapitalize'),
153
+ overrideStringValue: 'words',
154
+ },
155
+ {
156
+ name: 'autoComplete',
157
+ tagName: 'input',
158
+ overrideStringValue: 'email',
159
+ read: getProperty('autocomplete'),
160
+ },
161
+ {
162
+ name: 'autoCorrect',
163
+ tagName: 'input',
164
+ overrideStringValue: 'off',
165
+ read: getAttribute('autocorrect'),
166
+ },
167
+ {name: 'autoPlay', tagName: 'video', read: getProperty('autoplay')},
168
+ {
169
+ name: 'autoReverse',
170
+ containerTagName: 'svg',
171
+ tagName: 'animate',
172
+ read: getSVGAttribute('autoreverse'),
173
+ },
174
+ {name: 'autoSave', tagName: 'input', read: getAttribute('autosave')},
175
+ {
176
+ name: 'azimuth',
177
+ containerTagName: 'svg',
178
+ tagName: 'feDistantLight',
179
+ read: getSVGProperty('azimuth'),
180
+ },
181
+ {
182
+ name: 'baseFrequency',
183
+ containerTagName: 'svg',
184
+ tagName: 'feTurbulence',
185
+ read: getSVGAttribute('baseFrequency'),
186
+ },
187
+ {
188
+ name: 'baseline-shift',
189
+ containerTagName: 'svg',
190
+ tagName: 'textPath',
191
+ read: getSVGAttribute('baseline-shift'),
192
+ },
193
+ {
194
+ name: 'baselineShift',
195
+ containerTagName: 'svg',
196
+ tagName: 'textPath',
197
+ read: getSVGAttribute('baseline-shift'),
198
+ },
199
+ {name: 'baseProfile', tagName: 'svg', read: getSVGAttribute('baseProfile')},
200
+ {
201
+ name: 'bbox',
202
+ containerTagName: 'svg',
203
+ tagName: 'font-face',
204
+ read: getSVGAttribute('bbox'),
205
+ },
206
+ {
207
+ name: 'begin',
208
+ containerTagName: 'svg',
209
+ tagName: 'animate',
210
+ read: getSVGAttribute('begin'),
211
+ },
212
+ {
213
+ name: 'bias',
214
+ containerTagName: 'svg',
215
+ tagName: 'feConvolveMatrix',
216
+ read: getSVGProperty('bias'),
217
+ },
218
+ {
219
+ name: 'by',
220
+ containerTagName: 'svg',
221
+ tagName: 'animate',
222
+ read: getSVGAttribute('by'),
223
+ },
224
+ {
225
+ name: 'calcMode',
226
+ containerTagName: 'svg',
227
+ tagName: 'animate',
228
+ overrideStringValue: 'discrete',
229
+ read: getSVGAttribute('calcMode'),
230
+ },
231
+ {
232
+ name: 'cap-height',
233
+ containerTagName: 'svg',
234
+ tagName: 'font-face',
235
+ read: getSVGAttribute('cap-height'),
236
+ },
237
+ {
238
+ name: 'capHeight',
239
+ containerTagName: 'svg',
240
+ tagName: 'font-face',
241
+ read: getSVGAttribute('cap-height'),
242
+ },
243
+ {
244
+ name: 'capture',
245
+ tagName: 'input',
246
+ overrideStringValue: 'environment',
247
+ read: getAttribute('capture'),
248
+ },
249
+ {name: 'cellPadding', tagName: 'table'},
250
+ {name: 'cellSpacing', tagName: 'table'},
251
+ {
252
+ name: 'challenge',
253
+ tagName: 'keygen',
254
+ read: getAttribute('challenge'), // The property is not supported in Chrome.
255
+ },
256
+ {name: 'charSet', tagName: 'script', read: getProperty('charset')},
257
+ {name: 'checked', tagName: 'input', extraProps: {onChange() {}}},
258
+ {name: 'Checked', tagName: 'input', read: getAttribute('Checked')},
259
+ {name: 'Children', read: getAttribute('children')},
260
+ {name: 'children'},
261
+ {
262
+ name: 'cite',
263
+ tagName: 'blockquote',
264
+ overrideStringValue: 'http://reactjs.com/',
265
+ },
266
+ {name: 'class', read: getAttribute('class')},
267
+ {name: 'classID', tagName: 'object', read: getAttribute('classid')},
268
+ {name: 'className'},
269
+ {name: 'clip', tagName: 'svg', read: getAttribute('clip')},
270
+ {
271
+ name: 'clip-path',
272
+ containerTagName: 'svg',
273
+ tagName: 'path',
274
+ read: getSVGAttribute('clip-path'),
275
+ },
276
+ {
277
+ name: 'clipPath',
278
+ containerTagName: 'svg',
279
+ tagName: 'path',
280
+ read: getSVGAttribute('clip-path'),
281
+ },
282
+ {
283
+ name: 'clipPathUnits',
284
+ containerTagName: 'svg',
285
+ tagName: 'clipPath',
286
+ overrideStringValue: 'objectBoundingBox',
287
+ read: getSVGProperty('clipPathUnits'),
288
+ },
289
+ {
290
+ name: 'clip-rule',
291
+ containerTagName: 'svg',
292
+ tagName: 'path',
293
+ read: getSVGAttribute('clip-rule'),
294
+ },
295
+ {
296
+ name: 'clipRule',
297
+ containerTagName: 'svg',
298
+ tagName: 'path',
299
+ read: getSVGAttribute('clip-rule'),
300
+ },
301
+ {
302
+ name: 'color',
303
+ containerTagName: 'svg',
304
+ tagName: 'text',
305
+ read: getSVGAttribute('color'),
306
+ },
307
+ {
308
+ name: 'color-interpolation',
309
+ containerTagName: 'svg',
310
+ tagName: 'animate',
311
+ overrideStringValue: 'sRGB',
312
+ read: getSVGAttribute('color-interpolation'),
313
+ },
314
+ {
315
+ name: 'colorInterpolation',
316
+ containerTagName: 'svg',
317
+ tagName: 'animate',
318
+ overrideStringValue: 'sRGB',
319
+ read: getSVGAttribute('color-interpolation'),
320
+ },
321
+ {
322
+ name: 'color-interpolation-filters',
323
+ containerTagName: 'svg',
324
+ tagName: 'feComposite',
325
+ overrideStringValue: 'sRGB',
326
+ read: getSVGAttribute('color-interpolation-filters'),
327
+ },
328
+ {
329
+ name: 'colorInterpolationFilters',
330
+ containerTagName: 'svg',
331
+ tagName: 'feComposite',
332
+ overrideStringValue: 'sRGB',
333
+ read: getSVGAttribute('color-interpolation-filters'),
334
+ },
335
+ {
336
+ name: 'color-profile',
337
+ containerTagName: 'svg',
338
+ tagName: 'image',
339
+ overrideStringValue: 'sRGB',
340
+ read: getSVGAttribute('color-profile'),
341
+ },
342
+ {
343
+ name: 'colorProfile',
344
+ containerTagName: 'svg',
345
+ tagName: 'image',
346
+ overrideStringValue: 'sRGB',
347
+ read: getSVGAttribute('color-profile'),
348
+ },
349
+ {
350
+ name: 'color-rendering',
351
+ containerTagName: 'svg',
352
+ tagName: 'animate',
353
+ overrideStringValue: 'optimizeSpeed',
354
+ read: getSVGAttribute('color-rendering'),
355
+ },
356
+ {
357
+ name: 'colorRendering',
358
+ containerTagName: 'svg',
359
+ tagName: 'animate',
360
+ overrideStringValue: 'optimizeSpeed',
361
+ read: getSVGAttribute('color-rendering'),
362
+ },
363
+ {name: 'cols', tagName: 'textarea'},
364
+ {name: 'colSpan', containerTagName: 'tr', tagName: 'td'},
365
+ {name: 'content', tagName: 'meta'},
366
+ {name: 'contentEditable'},
367
+ {
368
+ name: 'contentScriptType',
369
+ tagName: 'svg',
370
+ read: getSVGAttribute('contentScriptType'),
371
+ },
372
+ {
373
+ name: 'contentStyleType',
374
+ tagName: 'svg',
375
+ read: getSVGAttribute('contentStyleType'),
376
+ },
377
+ {name: 'contextMenu', read: getAttribute('contextmenu')}, // TODO: Read the property by rendering a menu with the ID.
378
+ {name: 'controls', tagName: 'video'},
379
+ {name: 'coords', tagName: 'a'},
380
+ {name: 'crossOrigin', tagName: 'script'},
381
+ {name: 'cursor', tag: 'svg', read: getAttribute('cursor')},
382
+ {
383
+ name: 'cx',
384
+ containerTagName: 'svg',
385
+ tagName: 'circle',
386
+ overrideStringValue: '10px',
387
+ read: getSVGProperty('cx'),
388
+ },
389
+ {
390
+ name: 'cy',
391
+ containerTagName: 'svg',
392
+ tagName: 'circle',
393
+ overrideStringValue: '10%',
394
+ read: getSVGProperty('cy'),
395
+ },
396
+ {
397
+ name: 'd',
398
+ containerTagName: 'svg',
399
+ tagName: 'path',
400
+ read: getSVGAttribute('d'),
401
+ },
402
+ {
403
+ name: 'dangerouslySetInnerHTML',
404
+ read: getAttribute('dangerouslySetInnerHTML'),
405
+ },
406
+ {
407
+ name: 'DangerouslySetInnerHTML',
408
+ read: getAttribute('DangerouslySetInnerHTML'),
409
+ },
410
+ {name: 'data', read: getAttribute('data')},
411
+ {name: 'data-', read: getAttribute('data-')},
412
+ {name: 'data-unknownattribute', read: getAttribute('data-unknownattribute')},
413
+ {name: 'datatype', read: getAttribute('datatype')},
414
+ {
415
+ name: 'dateTime',
416
+ tagName: 'time',
417
+ overrideStringValue: '2001-05-15T19:00',
418
+ read: getAttribute('datetime'),
419
+ },
420
+ {
421
+ name: 'decelerate',
422
+ containerTagName: 'svg',
423
+ tagName: 'animate',
424
+ read: getSVGAttribute('decelerate'),
425
+ },
426
+ {name: 'default', tagName: 'track'},
427
+ {
428
+ name: 'defaultchecked',
429
+ tagName: 'input',
430
+ read: getAttribute('defaultchecked'),
431
+ },
432
+ {name: 'defaultChecked', tagName: 'input'},
433
+ {name: 'defaultValue', tagName: 'input'},
434
+ {name: 'defaultValuE', tagName: 'input', read: getAttribute('defaultValuE')},
435
+ {name: 'defer', tagName: 'script'},
436
+ {
437
+ name: 'descent',
438
+ containerTagName: 'svg',
439
+ tagName: 'font-face',
440
+ read: getSVGAttribute('descent'),
441
+ },
442
+ {
443
+ name: 'diffuseConstant',
444
+ containerTagName: 'svg',
445
+ tagName: 'feDiffuseLighting',
446
+ read: getSVGProperty('diffuseConstant'),
447
+ },
448
+ {name: 'dir', overrideStringValue: 'rtl'},
449
+ {
450
+ name: 'direction',
451
+ containerTagName: 'svg',
452
+ tagName: 'text',
453
+ overrideStringValue: 'rtl',
454
+ read: getSVGAttribute('direction'),
455
+ },
456
+ {name: 'disabled', tagName: 'input'},
457
+ {
458
+ name: 'display',
459
+ tagName: 'svg',
460
+ overrideStringValue: 'list-item',
461
+ read: getAttribute('display'),
462
+ },
463
+ {
464
+ name: 'divisor',
465
+ containerTagName: 'svg',
466
+ tagName: 'feConvolveMatrix',
467
+ read: getSVGProperty('divisor'),
468
+ },
469
+ {
470
+ name: 'dominant-baseline',
471
+ containerTagName: 'svg',
472
+ tagName: 'text',
473
+ read: getSVGAttribute('dominant-baseline'),
474
+ },
475
+ {
476
+ name: 'dominantBaseline',
477
+ containerTagName: 'svg',
478
+ tagName: 'text',
479
+ read: getSVGAttribute('dominant-baseline'),
480
+ },
481
+ {name: 'download', tagName: 'a'},
482
+ {name: 'dOwNlOaD', tagName: 'a', read: getAttribute('dOwNlOaD')},
483
+ {name: 'draggable'},
484
+ {
485
+ name: 'dur',
486
+ containerTagName: 'svg',
487
+ tagName: 'animate',
488
+ read: getSVGAttribute('dur'),
489
+ },
490
+ {
491
+ name: 'dx',
492
+ containerTagName: 'svg',
493
+ tagName: 'text',
494
+ overrideStringValue: '1pt 2px 3em',
495
+ read: getSVGProperty('dx'),
496
+ },
497
+ {
498
+ name: 'dX',
499
+ containerTagName: 'svg',
500
+ tagName: 'text',
501
+ overrideStringValue: '1pt 2px 3em',
502
+ read: getSVGProperty('dx'),
503
+ },
504
+ {
505
+ name: 'dy',
506
+ containerTagName: 'svg',
507
+ tagName: 'text',
508
+ overrideStringValue: '1 2 3',
509
+ read: getSVGProperty('dy'),
510
+ },
511
+ {
512
+ name: 'dY',
513
+ containerTagName: 'svg',
514
+ tagName: 'text',
515
+ overrideStringValue: '1 2 3',
516
+ read: getSVGProperty('dy'),
517
+ },
518
+ {
519
+ name: 'edgeMode',
520
+ containerTagName: 'svg',
521
+ tagName: 'feConvolveMatrix',
522
+ overrideStringValue: 'wrap',
523
+ read: getSVGProperty('edgeMode'),
524
+ },
525
+ {
526
+ name: 'elevation',
527
+ containerTagName: 'svg',
528
+ tagName: 'feDistantLight',
529
+ read: getSVGProperty('elevation'),
530
+ },
531
+ {
532
+ name: 'enable-background',
533
+ containerTagName: 'svg',
534
+ tagName: 'path',
535
+ read: getSVGAttribute('enable-background'),
536
+ },
537
+ {
538
+ name: 'enableBackground',
539
+ containerTagName: 'svg',
540
+ tagName: 'path',
541
+ read: getSVGAttribute('enable-background'),
542
+ },
543
+ {
544
+ name: 'encType',
545
+ tagName: 'form',
546
+ overrideStringValue: 'text/plain',
547
+ read: getProperty('enctype'),
548
+ },
549
+ {
550
+ name: 'end',
551
+ containerTagName: 'svg',
552
+ tagName: 'animate',
553
+ read: getSVGAttribute('end'),
554
+ },
555
+ {
556
+ name: 'exponent',
557
+ read: getSVGProperty('exponent'),
558
+ containerTagName: 'svg',
559
+ tagName: 'feFuncA',
560
+ },
561
+ {
562
+ name: 'externalResourcesRequired',
563
+ containerTagName: 'svg',
564
+ tagName: 'path',
565
+ read: getSVGAttribute('externalResourcesRequired'),
566
+ },
567
+ {
568
+ name: 'fill',
569
+ containerTagName: 'svg',
570
+ tagName: 'path',
571
+ read: getSVGAttribute('fill'),
572
+ },
573
+ {
574
+ name: 'fillOpacity',
575
+ containerTagName: 'svg',
576
+ tagName: 'circle',
577
+ read: getSVGAttribute('fill-opacity'),
578
+ },
579
+ {
580
+ name: 'fill-opacity',
581
+ containerTagName: 'svg',
582
+ tagName: 'circle',
583
+ read: getSVGAttribute('fill-opacity'),
584
+ },
585
+ {
586
+ name: 'fillRule',
587
+ containerTagName: 'svg',
588
+ tagName: 'circle',
589
+ read: getSVGAttribute('fill-rule'),
590
+ },
591
+ {
592
+ name: 'fill-rule',
593
+ containerTagName: 'svg',
594
+ tagName: 'circle',
595
+ read: getSVGAttribute('fill-rule'),
596
+ },
597
+ {
598
+ name: 'filter',
599
+ containerTagName: 'svg',
600
+ tagName: 'g',
601
+ read: getSVGAttribute('filter'),
602
+ },
603
+ {
604
+ name: 'filterRes',
605
+ containerTagName: 'svg',
606
+ tagName: 'filter',
607
+ read: getSVGAttribute('filterRes'),
608
+ },
609
+ {
610
+ name: 'filterUnits',
611
+ containerTagName: 'svg',
612
+ tagName: 'filter',
613
+ overrideStringValue: 'userSpaceOnUse',
614
+ read: getSVGProperty('filterUnits'),
615
+ },
616
+ {
617
+ name: 'flood-color',
618
+ containerTagName: 'svg',
619
+ tagName: 'feflood',
620
+ overrideStringValue: 'currentColor',
621
+ read: getSVGAttribute('flood-color'),
622
+ },
623
+ {
624
+ name: 'floodColor',
625
+ containerTagName: 'svg',
626
+ tagName: 'feflood',
627
+ overrideStringValue: 'currentColor',
628
+ read: getSVGAttribute('flood-color'),
629
+ },
630
+ {
631
+ name: 'flood-opacity',
632
+ containerTagName: 'svg',
633
+ tagName: 'feflood',
634
+ overrideStringValue: 'inherit',
635
+ read: getSVGAttribute('flood-opacity'),
636
+ },
637
+ {
638
+ name: 'floodOpacity',
639
+ containerTagName: 'svg',
640
+ tagName: 'feflood',
641
+ overrideStringValue: 'inherit',
642
+ read: getSVGAttribute('flood-opacity'),
643
+ },
644
+ {name: 'focusable', tagName: 'p', read: getAttribute('focusable')},
645
+ {
646
+ name: 'font-family',
647
+ read: getSVGAttribute('font-family'),
648
+ containerTagName: 'svg',
649
+ tagName: 'font-face',
650
+ },
651
+ {
652
+ name: 'font-size',
653
+ read: getSVGAttribute('font-size'),
654
+ containerTagName: 'svg',
655
+ tagName: 'font-face',
656
+ },
657
+ {
658
+ name: 'font-size-adjust',
659
+ containerTagName: 'svg',
660
+ tagName: 'text',
661
+ read: getSVGAttribute('font-size-adjust'),
662
+ },
663
+ {
664
+ name: 'font-stretch',
665
+ read: getSVGAttribute('font-stretch'),
666
+ containerTagName: 'svg',
667
+ tagName: 'font-face',
668
+ },
669
+ {
670
+ name: 'font-style',
671
+ read: getSVGAttribute('font-style'),
672
+ containerTagName: 'svg',
673
+ tagName: 'font-face',
674
+ },
675
+ {
676
+ name: 'font-variant',
677
+ read: getSVGAttribute('font-variant'),
678
+ containerTagName: 'svg',
679
+ tagName: 'font-face',
680
+ },
681
+ {
682
+ name: 'font-weight',
683
+ read: getSVGAttribute('font-weight'),
684
+ containerTagName: 'svg',
685
+ tagName: 'font-face',
686
+ },
687
+ {
688
+ name: 'fontFamily',
689
+ read: getSVGAttribute('font-family'),
690
+ containerTagName: 'svg',
691
+ tagName: 'font-face',
692
+ },
693
+ {
694
+ name: 'fontSize',
695
+ read: getSVGAttribute('font-size'),
696
+ containerTagName: 'svg',
697
+ tagName: 'font-face',
698
+ },
699
+ {
700
+ name: 'fontSizeAdjust',
701
+ containerTagName: 'svg',
702
+ tagName: 'text',
703
+ read: getSVGAttribute('font-size-adjust'),
704
+ },
705
+ {
706
+ name: 'fontStretch',
707
+ read: getSVGAttribute('font-stretch'),
708
+ containerTagName: 'svg',
709
+ tagName: 'font-face',
710
+ },
711
+ {
712
+ name: 'fontStyle',
713
+ read: getSVGAttribute('font-style'),
714
+ containerTagName: 'svg',
715
+ tagName: 'font-face',
716
+ },
717
+ {
718
+ name: 'fontVariant',
719
+ read: getSVGAttribute('font-variant'),
720
+ containerTagName: 'svg',
721
+ tagName: 'font-face',
722
+ },
723
+ {
724
+ name: 'fontWeight',
725
+ read: getSVGAttribute('font-weight'),
726
+ containerTagName: 'svg',
727
+ tagName: 'font-face',
728
+ },
729
+ {name: 'for', tagName: 'label', read: getProperty('htmlFor')},
730
+ {name: 'fOr', tagName: 'label', read: getProperty('htmlFor')},
731
+ {name: 'form', read: getAttribute('form')}, // TODO: Read the property by rendering into a form with i
732
+ {
733
+ name: 'formAction',
734
+ tagName: 'input',
735
+ overrideStringValue: 'https://reactjs.com',
736
+ },
737
+ {
738
+ name: 'format',
739
+ read: getSVGAttribute('format'),
740
+ containerTagName: 'svg',
741
+ tagName: 'altGlyph',
742
+ },
743
+ {name: 'formEncType', tagName: 'input', read: getProperty('formEnctype')},
744
+ {name: 'formMethod', tagName: 'input', overrideStringValue: 'POST'},
745
+ {name: 'formNoValidate', tagName: 'input'},
746
+ {name: 'formTarget', tagName: 'input'},
747
+ {name: 'frameBorder', tagName: 'iframe'},
748
+ {
749
+ name: 'from',
750
+ read: getSVGAttribute('from'),
751
+ containerTagName: 'svg',
752
+ tagName: 'animate',
753
+ },
754
+ {
755
+ name: 'fx',
756
+ read: getSVGProperty('fx'),
757
+ containerTagName: 'svg',
758
+ overrideStringValue: '10px',
759
+ tagName: 'radialGradient',
760
+ },
761
+ {
762
+ name: 'fX',
763
+ containerTagName: 'svg',
764
+ tagName: 'radialGradient',
765
+ overrideStringValue: '10px',
766
+ read: getSVGProperty('fx'),
767
+ },
768
+ {
769
+ name: 'fY',
770
+ containerTagName: 'svg',
771
+ tagName: 'radialGradient',
772
+ overrideStringValue: '20em',
773
+ read: getSVGProperty('fy'),
774
+ },
775
+ {
776
+ name: 'fy',
777
+ read: getSVGProperty('fy'),
778
+ containerTagName: 'svg',
779
+ overrideStringValue: '20em',
780
+ tagName: 'radialGradient',
781
+ },
782
+ {
783
+ name: 'G1',
784
+ containerTagName: 'svg',
785
+ tagName: 'hkern',
786
+ read: getSVGAttribute('g1'),
787
+ },
788
+ {
789
+ name: 'g1',
790
+ read: getSVGAttribute('g1'),
791
+ containerTagName: 'svg',
792
+ tagName: 'hkern',
793
+ },
794
+ {
795
+ name: 'G2',
796
+ containerTagName: 'svg',
797
+ tagName: 'hkern',
798
+ read: getSVGAttribute('g2'),
799
+ },
800
+ {
801
+ name: 'g2',
802
+ read: getSVGAttribute('g2'),
803
+ containerTagName: 'svg',
804
+ tagName: 'hkern',
805
+ },
806
+ {
807
+ name: 'glyph-name',
808
+ read: getSVGAttribute('glyph-name'),
809
+ containerTagName: 'svg',
810
+ tagName: 'glyph',
811
+ },
812
+ {
813
+ name: 'glyph-orientation-horizontal',
814
+ containerTagName: 'svg',
815
+ tagName: 'text',
816
+ read: getSVGAttribute('glyph-orientation-horizontal'),
817
+ },
818
+ {
819
+ name: 'glyph-orientation-vertical',
820
+ containerTagName: 'svg',
821
+ tagName: 'text',
822
+ read: getSVGAttribute('glyph-orientation-vertical'),
823
+ },
824
+ {
825
+ name: 'glyphName',
826
+ read: getSVGAttribute('glyph-name'),
827
+ containerTagName: 'svg',
828
+ tagName: 'glyph',
829
+ },
830
+ {
831
+ name: 'glyphOrientationHorizontal',
832
+ containerTagName: 'svg',
833
+ tagName: 'text',
834
+ read: getSVGAttribute('glyph-orientation-horizontal'),
835
+ },
836
+ {
837
+ name: 'glyphOrientationVertical',
838
+ containerTagName: 'svg',
839
+ tagName: 'text',
840
+ read: getSVGAttribute('glyph-orientation-vertical'),
841
+ },
842
+ {
843
+ name: 'glyphRef',
844
+ read: getSVGAttribute('glyph-ref'),
845
+ containerTagName: 'svg',
846
+ tagName: 'altGlyph',
847
+ },
848
+ {
849
+ name: 'gradientTransform',
850
+ read: getSVGProperty('gradientTransform'),
851
+ containerTagName: 'svg',
852
+ overrideStringValue: 'translate(-10,-20) scale(2) rotate(45) translate(5,10)',
853
+ tagName: 'linearGradient',
854
+ },
855
+ {
856
+ name: 'gradientUnits',
857
+ read: getSVGProperty('gradientUnits'),
858
+ containerTagName: 'svg',
859
+ overrideStringValue: 'userSpaceOnUse',
860
+ tagName: 'linearGradient',
861
+ },
862
+ {
863
+ name: 'hanging',
864
+ read: getSVGAttribute('hanging'),
865
+ containerTagName: 'svg',
866
+ tagName: 'font-face',
867
+ },
868
+ // Disabled because it crashes other tests with React 15.
869
+ // TODO: re-enable when we no longer compare to 15.
870
+ // {name: 'hasOwnProperty', read: getAttribute('hasOwnProperty')},
871
+ {name: 'headers', containerTagName: 'tr', tagName: 'td'},
872
+ {name: 'height', tagName: 'img'},
873
+ {
874
+ name: 'height',
875
+ containerTagName: 'svg',
876
+ tagName: 'rect',
877
+ read: getSVGProperty('height'),
878
+ overrideStringValue: '100%',
879
+ },
880
+ {name: 'hidden'},
881
+ {name: 'high', tagName: 'meter'},
882
+ {
883
+ name: 'horiz-adv-x',
884
+ read: getSVGAttribute('horiz-adv-x'),
885
+ containerTagName: 'svg',
886
+ tagName: 'font',
887
+ },
888
+ {
889
+ name: 'horiz-origin-x',
890
+ read: getSVGAttribute('horiz-origin-x'),
891
+ containerTagName: 'svg',
892
+ tagName: 'font',
893
+ },
894
+ {
895
+ name: 'horizAdvX',
896
+ read: getSVGAttribute('horiz-adv-x'),
897
+ containerTagName: 'svg',
898
+ tagName: 'font',
899
+ },
900
+ {
901
+ name: 'horizOriginX',
902
+ read: getSVGAttribute('horiz-origin-x'),
903
+ containerTagName: 'svg',
904
+ tagName: 'font',
905
+ },
906
+ {name: 'href', tagName: 'a', overrideStringValue: 'https://reactjs.com'},
907
+ {name: 'hrefLang', read: getAttribute('hreflang')},
908
+ {name: 'htmlFor', tagName: 'label'},
909
+ {name: 'http-equiv', tagName: 'meta', read: getProperty('httpEquiv')},
910
+ {name: 'httpEquiv', tagName: 'meta'},
911
+ {name: 'icon', tagName: 'command', read: getAttribute('icon')},
912
+ {name: 'id'},
913
+ {name: 'ID', read: getProperty('id')},
914
+ {
915
+ name: 'ideographic',
916
+ read: getSVGAttribute('ideographic'),
917
+ containerTagName: 'svg',
918
+ tagName: 'font-face',
919
+ },
920
+ {
921
+ name: 'image-rendering',
922
+ tagName: 'svg',
923
+ read: getSVGAttribute('image-rendering'),
924
+ },
925
+ {
926
+ name: 'imageRendering',
927
+ tagName: 'svg',
928
+ read: getSVGAttribute('image-rendering'),
929
+ },
930
+ {
931
+ name: 'in',
932
+ read: getSVGAttribute('in'),
933
+ containerTagName: 'svg',
934
+ tagName: 'feBlend',
935
+ },
936
+ {
937
+ name: 'in2',
938
+ read: getSVGProperty('in2'),
939
+ containerTagName: 'svg',
940
+ tagName: 'feBlend',
941
+ },
942
+ {name: 'initialChecked', read: getAttribute('initialchecked')},
943
+ {name: 'initialValue', read: getAttribute('initialvalue')},
944
+ {name: 'inlist', read: getAttribute('inlist')},
945
+ {name: 'inputMode', tagName: 'input', read: getAttribute('inputmode')}, // TODO: Should use property but it's not implemented in Chrome
946
+ {name: 'integrity', tagName: 'script'},
947
+ {
948
+ name: 'intercept',
949
+ read: getSVGProperty('intercept'),
950
+ containerTagName: 'svg',
951
+ tagName: 'feFuncA',
952
+ },
953
+ {
954
+ name: 'is',
955
+ tagName: 'button',
956
+ overrideStringValue: 'x-test-element',
957
+ read: getAttribute('is'), // TODO: This could check if this is an extended custom element but this is a controversial spec.
958
+ },
959
+ {name: 'itemID', read: getAttribute('itemid')},
960
+ {name: 'itemProp', read: getAttribute('itemprop')},
961
+ {name: 'itemRef', read: getAttribute('itemref')},
962
+ {name: 'itemScope', read: getAttribute('itemscope')},
963
+ {name: 'itemType', read: getAttribute('itemtype')},
964
+ {
965
+ name: 'k',
966
+ read: getSVGAttribute('k'),
967
+ containerTagName: 'svg',
968
+ tagName: 'hkern',
969
+ },
970
+ {
971
+ name: 'K',
972
+ containerTagName: 'svg',
973
+ tagName: 'hkern',
974
+ read: getSVGAttribute('k'),
975
+ },
976
+ {
977
+ name: 'K1',
978
+ containerTagName: 'svg',
979
+ tagName: 'feComposite',
980
+ read: getSVGProperty('k1'),
981
+ },
982
+ {
983
+ name: 'k1',
984
+ read: getSVGProperty('k1'),
985
+ containerTagName: 'svg',
986
+ tagName: 'feComposite',
987
+ },
988
+ {
989
+ name: 'k2',
990
+ read: getSVGProperty('k2'),
991
+ containerTagName: 'svg',
992
+ tagName: 'feComposite',
993
+ },
994
+ {
995
+ name: 'k3',
996
+ read: getSVGProperty('k3'),
997
+ containerTagName: 'svg',
998
+ tagName: 'feComposite',
999
+ },
1000
+ {
1001
+ name: 'k4',
1002
+ read: getSVGProperty('k4'),
1003
+ containerTagName: 'svg',
1004
+ tagName: 'feComposite',
1005
+ },
1006
+ {
1007
+ name: 'kernelMatrix',
1008
+ read: getSVGProperty('kernelMatrix'),
1009
+ containerTagName: 'svg',
1010
+ tagName: 'feConvolveMatrix',
1011
+ overrideStringValue: '1 2 3,4',
1012
+ },
1013
+ {
1014
+ name: 'kernelUnitLength',
1015
+ read: getSVGAttribute('kernelUnitLength'),
1016
+ containerTagName: 'svg',
1017
+ tagName: 'feConvolveMatrix',
1018
+ },
1019
+ {
1020
+ name: 'kerning',
1021
+ containerTagName: 'svg',
1022
+ tagName: 'text',
1023
+ read: getSVGAttribute('kerning'),
1024
+ },
1025
+ {name: 'keyParams', read: getAttribute('keyParams')},
1026
+ {
1027
+ name: 'keyPoints',
1028
+ read: getSVGAttribute('keyPoints'),
1029
+ containerTagName: 'svg',
1030
+ tagName: 'animateMotion',
1031
+ },
1032
+ {
1033
+ name: 'keySplines',
1034
+ read: getSVGAttribute('keySplines'),
1035
+ containerTagName: 'svg',
1036
+ tagName: 'animate',
1037
+ },
1038
+ {
1039
+ name: 'keyTimes',
1040
+ read: getSVGAttribute('keyTimes'),
1041
+ containerTagName: 'svg',
1042
+ tagName: 'animate',
1043
+ },
1044
+ {name: 'keyType', read: getAttribute('keyType')},
1045
+ {name: 'kind', tagName: 'track', overrideStringValue: 'captions'},
1046
+ {name: 'label', tagName: 'track'},
1047
+ {name: 'LANG', read: getProperty('lang')},
1048
+ {name: 'lang'},
1049
+ {name: 'length', read: getAttribute('length')},
1050
+ {
1051
+ name: 'lengthAdjust',
1052
+ read: getSVGProperty('lengthAdjust'),
1053
+ containerTagName: 'svg',
1054
+ tagName: 'text',
1055
+ overrideStringValue: 'spacingAndGlyphs',
1056
+ },
1057
+ {
1058
+ name: 'letter-spacing',
1059
+ containerTagName: 'svg',
1060
+ tagName: 'text',
1061
+ read: getSVGAttribute('letter-spacing'),
1062
+ },
1063
+ {
1064
+ name: 'letterSpacing',
1065
+ containerTagName: 'svg',
1066
+ tagName: 'text',
1067
+ read: getSVGAttribute('letter-spacing'),
1068
+ },
1069
+ {
1070
+ name: 'lighting-color',
1071
+ containerTagName: 'svg',
1072
+ tagName: 'feDiffuseLighting',
1073
+ read: getSVGAttribute('lighting-color'),
1074
+ },
1075
+ {
1076
+ name: 'lightingColor',
1077
+ containerTagName: 'svg',
1078
+ tagName: 'feDiffuseLighting',
1079
+ read: getSVGAttribute('lighting-color'),
1080
+ },
1081
+ {
1082
+ name: 'limitingConeAngle',
1083
+ read: getSVGProperty('limitingConeAngle'),
1084
+ containerTagName: 'svg',
1085
+ tagName: 'feSpotLight',
1086
+ },
1087
+ {name: 'list', read: getAttribute('list')}, // TODO: This should match the ID of a datalist element and then read property.
1088
+ {
1089
+ name: 'local',
1090
+ read: getSVGAttribute('local'),
1091
+ containerTagName: 'svg',
1092
+ tagName: 'color-profile',
1093
+ },
1094
+ {name: 'loop', tagName: 'audio'},
1095
+ {name: 'low', tagName: 'meter'},
1096
+ {name: 'manifest', read: getAttribute('manifest')},
1097
+ {name: 'marginHeight', containerTagName: 'frameset', tagName: 'frame'},
1098
+ {name: 'marginWidth', containerTagName: 'frameset', tagName: 'frame'},
1099
+ {
1100
+ name: 'marker-end',
1101
+ containerTagName: 'svg',
1102
+ tagName: 'line',
1103
+ read: getSVGAttribute('marker-end'),
1104
+ },
1105
+ {
1106
+ name: 'marker-mid',
1107
+ containerTagName: 'svg',
1108
+ tagName: 'line',
1109
+ read: getSVGAttribute('marker-mid'),
1110
+ },
1111
+ {
1112
+ name: 'marker-start',
1113
+ containerTagName: 'svg',
1114
+ tagName: 'line',
1115
+ read: getSVGAttribute('marker-start'),
1116
+ },
1117
+ {
1118
+ name: 'markerEnd',
1119
+ containerTagName: 'svg',
1120
+ tagName: 'line',
1121
+ read: getSVGAttribute('marker-end'),
1122
+ },
1123
+ {
1124
+ name: 'markerHeight',
1125
+ read: getSVGProperty('markerHeight'),
1126
+ containerTagName: 'svg',
1127
+ tagName: 'marker',
1128
+ },
1129
+ {
1130
+ name: 'markerMid',
1131
+ containerTagName: 'svg',
1132
+ tagName: 'line',
1133
+ read: getSVGAttribute('marker-mid'),
1134
+ },
1135
+ {
1136
+ name: 'markerStart',
1137
+ containerTagName: 'svg',
1138
+ tagName: 'line',
1139
+ read: getSVGAttribute('marker-start'),
1140
+ },
1141
+ {
1142
+ name: 'markerUnits',
1143
+ read: getSVGProperty('markerUnits'),
1144
+ containerTagName: 'svg',
1145
+ tagName: 'marker',
1146
+ },
1147
+ {
1148
+ name: 'markerWidth',
1149
+ read: getSVGProperty('markerWidth'),
1150
+ containerTagName: 'svg',
1151
+ tagName: 'marker',
1152
+ },
1153
+ {
1154
+ name: 'mask',
1155
+ containerTagName: 'svg',
1156
+ tagName: 'path',
1157
+ read: getSVGAttribute('mask'),
1158
+ },
1159
+ {
1160
+ name: 'maskContentUnits',
1161
+ read: getSVGProperty('maskContentUnits'),
1162
+ containerTagName: 'svg',
1163
+ tagName: 'mask',
1164
+ overrideStringValue: 'objectBoundingBox',
1165
+ },
1166
+ {
1167
+ name: 'maskUnits',
1168
+ read: getSVGProperty('maskUnits'),
1169
+ containerTagName: 'svg',
1170
+ tagName: 'mask',
1171
+ overrideStringValue: 'userSpaceOnUse',
1172
+ },
1173
+ {
1174
+ name: 'mathematical',
1175
+ read: getSVGAttribute('mathematical'),
1176
+ containerTagName: 'svg',
1177
+ tagName: 'font-face',
1178
+ },
1179
+ {name: 'max', tagName: 'input'},
1180
+ {name: 'max', tagName: 'meter'},
1181
+ {name: 'max', tagName: 'progress'},
1182
+ {
1183
+ name: 'max',
1184
+ containerTagName: 'svg',
1185
+ tagName: 'animate',
1186
+ read: getSVGAttribute('max'),
1187
+ },
1188
+ {name: 'maxLength', tagName: 'textarea'},
1189
+ {name: 'media', tagName: 'link'},
1190
+ {
1191
+ name: 'media',
1192
+ containerTagName: 'svg',
1193
+ tagName: 'style',
1194
+ read: getSVGProperty('media'),
1195
+ },
1196
+ {name: 'mediaGroup', tagName: 'video', read: getAttribute('mediagroup')}, // TODO: Not yet implemented in Chrome.
1197
+ {name: 'method', tagName: 'form', overrideStringValue: 'POST'},
1198
+ {
1199
+ name: 'method',
1200
+ containerTagName: 'svg',
1201
+ tagName: 'textPath',
1202
+ read: getSVGProperty('method'),
1203
+ overrideStringValue: 'stretch',
1204
+ },
1205
+ {name: 'min', tagName: 'input'},
1206
+ {name: 'min', tagName: 'meter'},
1207
+ {
1208
+ name: 'min',
1209
+ containerTagName: 'svg',
1210
+ tagName: 'animate',
1211
+ read: getSVGAttribute('min'),
1212
+ },
1213
+ {name: 'minLength', tagName: 'input'},
1214
+ {
1215
+ name: 'mode',
1216
+ read: getSVGProperty('mode'),
1217
+ containerTagName: 'svg',
1218
+ tagName: 'feBlend',
1219
+ overrideStringValue: 'multiply',
1220
+ },
1221
+ {name: 'multiple', tagName: 'select'},
1222
+ {name: 'muted', tagName: 'video'},
1223
+ {name: 'name', tagName: 'input'},
1224
+ {
1225
+ name: 'name',
1226
+ containerTagName: 'svg',
1227
+ tagName: 'color-profile',
1228
+ read: getSVGAttribute('color-profile'),
1229
+ },
1230
+ {name: 'nonce', read: getAttribute('nonce')},
1231
+ {name: 'noValidate', tagName: 'form'},
1232
+ {
1233
+ name: 'numOctaves',
1234
+ read: getSVGProperty('numOctaves'),
1235
+ containerTagName: 'svg',
1236
+ tagName: 'feTurbulence',
1237
+ },
1238
+ {
1239
+ name: 'offset',
1240
+ read: getSVGProperty('offset'),
1241
+ containerTagName: 'svg',
1242
+ tagName: 'stop',
1243
+ },
1244
+ {name: 'on-click'}, // TODO: Check for event subscriptions
1245
+ {name: 'on-unknownevent'}, // TODO: Check for event subscriptions
1246
+ {name: 'onclick'}, // TODO: Check for event subscriptions
1247
+ {name: 'onClick'}, // TODO: Check for event subscriptions
1248
+ {name: 'onunknownevent'}, // TODO: Check for event subscriptions
1249
+ {name: 'onUnknownEvent'}, // TODO: Check for event subscriptions
1250
+ {
1251
+ name: 'opacity',
1252
+ containerTagName: 'svg',
1253
+ tagName: 'path',
1254
+ read: getSVGAttribute('opacity'),
1255
+ },
1256
+ {name: 'open', tagName: 'details'},
1257
+ {
1258
+ name: 'operator',
1259
+ read: getSVGProperty('operator'),
1260
+ containerTagName: 'svg',
1261
+ tagName: 'feComposite',
1262
+ overrideStringValue: 'xor',
1263
+ },
1264
+ {name: 'optimum', tagName: 'meter'},
1265
+ {
1266
+ name: 'order',
1267
+ read: getSVGAttribute('order'),
1268
+ containerTagName: 'svg',
1269
+ tagName: 'feConvolveMatrix',
1270
+ },
1271
+ {
1272
+ name: 'orient',
1273
+ read: getSVGAttribute('orient'),
1274
+ containerTagName: 'svg',
1275
+ tagName: 'marker',
1276
+ },
1277
+ {
1278
+ name: 'orientation',
1279
+ read: getSVGAttribute('orientation'),
1280
+ containerTagName: 'svg',
1281
+ tagName: 'glyph',
1282
+ },
1283
+ {
1284
+ name: 'origin',
1285
+ read: getSVGAttribute('origin'),
1286
+ containerTagName: 'svg',
1287
+ tagName: 'animateMotion',
1288
+ },
1289
+ {
1290
+ name: 'overflow',
1291
+ containerTagName: 'svg',
1292
+ tagName: 'path',
1293
+ read: getSVGAttribute('overflow'),
1294
+ },
1295
+ {
1296
+ name: 'overline-position',
1297
+ read: getSVGAttribute('overline-position'),
1298
+ containerTagName: 'svg',
1299
+ tagName: 'font-face',
1300
+ },
1301
+ {
1302
+ name: 'overline-thickness',
1303
+ read: getSVGAttribute('overline-thickness'),
1304
+ containerTagName: 'svg',
1305
+ tagName: 'font-face',
1306
+ },
1307
+ {
1308
+ name: 'overlinePosition',
1309
+ read: getSVGAttribute('overline-position'),
1310
+ containerTagName: 'svg',
1311
+ tagName: 'font-face',
1312
+ },
1313
+ {
1314
+ name: 'overlineThickness',
1315
+ read: getSVGAttribute('overline-thickness'),
1316
+ containerTagName: 'svg',
1317
+ tagName: 'font-face',
1318
+ },
1319
+ {
1320
+ name: 'paint-order',
1321
+ containerTagName: 'svg',
1322
+ tagName: 'path',
1323
+ read: getSVGAttribute('paint-order'),
1324
+ },
1325
+ {
1326
+ name: 'paintOrder',
1327
+ containerTagName: 'svg',
1328
+ tagName: 'path',
1329
+ read: getSVGAttribute('paint-order'),
1330
+ },
1331
+ {
1332
+ name: 'panose-1',
1333
+ read: getSVGAttribute('panose-1'),
1334
+ containerTagName: 'svg',
1335
+ tagName: 'font-face',
1336
+ },
1337
+ {
1338
+ name: 'panose1',
1339
+ containerTagName: 'svg',
1340
+ tagName: 'font-face',
1341
+ read: getSVGAttribute('panose-1'),
1342
+ },
1343
+ {
1344
+ name: 'pathLength',
1345
+ read: getSVGProperty('pathLength'),
1346
+ containerTagName: 'svg',
1347
+ tagName: 'path',
1348
+ },
1349
+ {name: 'pattern', tagName: 'input'},
1350
+ {
1351
+ name: 'patternContentUnits',
1352
+ read: getSVGProperty('patternContentUnits'),
1353
+ containerTagName: 'svg',
1354
+ tagName: 'pattern',
1355
+ overrideStringValue: 'objectBoundingBox',
1356
+ },
1357
+ {
1358
+ name: 'patternTransform',
1359
+ read: getSVGProperty('patternTransform'),
1360
+ containerTagName: 'svg',
1361
+ tagName: 'pattern',
1362
+ overrideStringValue: 'translate(-10,-20) scale(2) rotate(45) translate(5,10)',
1363
+ },
1364
+ {
1365
+ name: 'patternUnits',
1366
+ read: getSVGProperty('patternUnits'),
1367
+ containerTagName: 'svg',
1368
+ tagName: 'pattern',
1369
+ overrideStringValue: 'userSpaceOnUse',
1370
+ },
1371
+ {name: 'placeholder', tagName: 'input'},
1372
+ {name: 'playsInline', read: getAttribute('playsinline')},
1373
+ {
1374
+ name: 'pointer-events',
1375
+ containerTagName: 'svg',
1376
+ tagName: 'path',
1377
+ read: getSVGAttribute('pointer-events'),
1378
+ },
1379
+ {
1380
+ name: 'pointerEvents',
1381
+ containerTagName: 'svg',
1382
+ tagName: 'path',
1383
+ read: getSVGAttribute('pointer-events'),
1384
+ },
1385
+ {
1386
+ name: 'points',
1387
+ read: getSVGProperty('points'),
1388
+ containerTagName: 'svg',
1389
+ tagName: 'polygon',
1390
+ overrideStringValue: '350,75 379,161 469,161',
1391
+ },
1392
+ {
1393
+ name: 'pointsAtX',
1394
+ read: getSVGProperty('pointsAtX'),
1395
+ containerTagName: 'svg',
1396
+ tagName: 'feSpotLight',
1397
+ },
1398
+ {
1399
+ name: 'pointsAtY',
1400
+ read: getSVGProperty('pointsAtY'),
1401
+ containerTagName: 'svg',
1402
+ tagName: 'feSpotLight',
1403
+ },
1404
+ {
1405
+ name: 'pointsAtZ',
1406
+ read: getSVGProperty('pointsAtZ'),
1407
+ containerTagName: 'svg',
1408
+ tagName: 'feSpotLight',
1409
+ },
1410
+ {
1411
+ name: 'poster',
1412
+ tagName: 'video',
1413
+ overrideStringValue: 'https://reactjs.com',
1414
+ },
1415
+ {name: 'prefix', read: getAttribute('prefix')},
1416
+ {name: 'preload', tagName: 'video', overrideStringValue: 'none'},
1417
+ {
1418
+ name: 'preserveAlpha',
1419
+ read: getSVGProperty('preserveAlpha'),
1420
+ containerTagName: 'svg',
1421
+ tagName: 'feConvolveMatrix',
1422
+ },
1423
+ {
1424
+ name: 'preserveAspectRatio',
1425
+ read: getSVGProperty('preserveAspectRatio'),
1426
+ containerTagName: 'svg',
1427
+ tagName: 'feImage',
1428
+ overrideStringValue: 'xMinYMin slice',
1429
+ },
1430
+ {
1431
+ name: 'primitiveUnits',
1432
+ read: getSVGProperty('primitiveUnits'),
1433
+ containerTagName: 'svg',
1434
+ tagName: 'filter',
1435
+ overrideStringValue: 'objectBoundingBox',
1436
+ },
1437
+ {name: 'profile', read: getAttribute('profile')},
1438
+ {name: 'property', read: getAttribute('property')},
1439
+ {name: 'props', read: getAttribute('props')},
1440
+ {
1441
+ name: 'r',
1442
+ read: getSVGProperty('r'),
1443
+ containerTagName: 'svg',
1444
+ tagName: 'circle',
1445
+ overrideStringValue: '10pt',
1446
+ },
1447
+ {name: 'radioGroup', tagName: 'command', read: getAttribute('radiogroup')},
1448
+ {
1449
+ name: 'radius',
1450
+ read: getSVGAttribute('radius'),
1451
+ containerTagName: 'svg',
1452
+ tagName: 'feMorphology',
1453
+ },
1454
+ {name: 'readOnly', tagName: 'input'},
1455
+ {name: 'referrerPolicy', tagName: 'iframe'},
1456
+ {
1457
+ name: 'refX',
1458
+ read: getSVGProperty('refX'),
1459
+ containerTagName: 'svg',
1460
+ tagName: 'marker',
1461
+ overrideStringValue: '5em',
1462
+ },
1463
+ {
1464
+ name: 'refY',
1465
+ read: getSVGProperty('refY'),
1466
+ containerTagName: 'svg',
1467
+ tagName: 'marker',
1468
+ overrideStringValue: '6em',
1469
+ },
1470
+ {name: 'rel', tagName: 'a'},
1471
+ {
1472
+ name: 'rendering-intent',
1473
+ read: getSVGAttribute('rendering-intent'),
1474
+ containerTagName: 'svg',
1475
+ tagName: 'color-profile',
1476
+ },
1477
+ {
1478
+ name: 'renderingIntent',
1479
+ read: getSVGAttribute('rendering-intent'),
1480
+ containerTagName: 'svg',
1481
+ tagName: 'color-profile',
1482
+ },
1483
+ {
1484
+ name: 'repeatCount',
1485
+ read: getSVGAttribute('repeatcount'),
1486
+ containerTagName: 'svg',
1487
+ tagName: 'animate',
1488
+ },
1489
+ {
1490
+ name: 'repeatDur',
1491
+ read: getSVGAttribute('repeatdur'),
1492
+ containerTagName: 'svg',
1493
+ tagName: 'animate',
1494
+ },
1495
+ {name: 'required', tagName: 'input'},
1496
+ {
1497
+ name: 'requiredExtensions',
1498
+ read: getSVGProperty('requiredExtensions'),
1499
+ containerTagName: 'svg',
1500
+ tagName: 'a',
1501
+ },
1502
+ {
1503
+ name: 'requiredFeatures',
1504
+ read: getSVGAttribute('requiredFeatures'),
1505
+ containerTagName: 'svg',
1506
+ tagName: 'a',
1507
+ },
1508
+ {name: 'resource', read: getAttribute('resource')},
1509
+ {
1510
+ name: 'restart',
1511
+ read: getSVGAttribute('resource'),
1512
+ containerTagName: 'svg',
1513
+ tagName: 'animate',
1514
+ },
1515
+ {
1516
+ name: 'result',
1517
+ read: getSVGProperty('result'),
1518
+ containerTagName: 'svg',
1519
+ tagName: 'feBlend',
1520
+ },
1521
+ {name: 'results', tagName: 'input', read: getAttribute('results')}, // TODO: Should use property but it's not supported in Chrome.
1522
+ {name: 'reversed', tagName: 'ol'},
1523
+ {name: 'role', read: getAttribute('role')},
1524
+ {
1525
+ name: 'rotate',
1526
+ read: getSVGAttribute('role'),
1527
+ containerTagName: 'svg',
1528
+ tagName: 'altGlyph',
1529
+ },
1530
+ {name: 'rows', tagName: 'textarea'},
1531
+ {name: 'rowSpan', containerTagName: 'tr', tagName: 'td'},
1532
+ {
1533
+ name: 'rx',
1534
+ read: getSVGProperty('rx'),
1535
+ containerTagName: 'svg',
1536
+ tagName: 'ellipse',
1537
+ overrideStringValue: '1px',
1538
+ },
1539
+ {
1540
+ name: 'ry',
1541
+ read: getSVGProperty('ry'),
1542
+ containerTagName: 'svg',
1543
+ tagName: 'ellipse',
1544
+ overrideStringValue: '2px',
1545
+ },
1546
+ {
1547
+ name: 'sandbox',
1548
+ tagName: 'iframe',
1549
+ overrideStringValue: 'allow-forms allow-scripts',
1550
+ },
1551
+ {
1552
+ name: 'scale',
1553
+ read: getSVGProperty('scale'),
1554
+ containerTagName: 'svg',
1555
+ tagName: 'feDisplacementMap',
1556
+ },
1557
+ {
1558
+ name: 'scope',
1559
+ containerTagName: 'tr',
1560
+ tagName: 'th',
1561
+ overrideStringValue: 'row',
1562
+ },
1563
+ {name: 'scoped', tagName: 'style', read: getAttribute('scoped')},
1564
+ {name: 'scrolling', tagName: 'iframe', overrideStringValue: 'no'},
1565
+ {name: 'seamless', tagName: 'iframe', read: getAttribute('seamless')},
1566
+ {name: 'security', tagName: 'iframe', read: getAttribute('security')},
1567
+ {
1568
+ name: 'seed',
1569
+ read: getSVGProperty('seed'),
1570
+ containerTagName: 'svg',
1571
+ tagName: 'feTurbulence',
1572
+ },
1573
+ {name: 'selected', tagName: 'option', containerTagName: 'select'},
1574
+ {name: 'selectedIndex', tagName: 'select'},
1575
+ {name: 'shape', tagName: 'a'},
1576
+ {
1577
+ name: 'shape-rendering',
1578
+ tagName: 'svg',
1579
+ read: getSVGAttribute('shape-rendering'),
1580
+ },
1581
+ {
1582
+ name: 'shapeRendering',
1583
+ tagName: 'svg',
1584
+ read: getSVGAttribute('shape-rendering'),
1585
+ },
1586
+ {name: 'size', tagName: 'input'},
1587
+ {name: 'sizes', tagName: 'link'},
1588
+ {
1589
+ name: 'slope',
1590
+ read: getSVGAttribute('slope'),
1591
+ containerTagName: 'svg',
1592
+ tagName: 'font-face',
1593
+ },
1594
+ {
1595
+ name: 'spacing',
1596
+ read: getSVGProperty('spacing'),
1597
+ containerTagName: 'svg',
1598
+ tagName: 'textPath',
1599
+ overrideStringValue: 'auto',
1600
+ },
1601
+ {name: 'span', containerTagName: 'colgroup', tagName: 'col'},
1602
+ {
1603
+ name: 'specularConstant',
1604
+ read: getSVGProperty('specularConstant'),
1605
+ containerTagName: 'svg',
1606
+ tagName: 'feSpecularLighting',
1607
+ },
1608
+ {
1609
+ name: 'specularExponent',
1610
+ read: getSVGProperty('specularConstant'),
1611
+ containerTagName: 'svg',
1612
+ tagName: 'feSpecularLighting',
1613
+ },
1614
+ {name: 'speed', read: getAttribute('speed')},
1615
+ {
1616
+ name: 'spellCheck',
1617
+ overrideStringValue: 'false',
1618
+ tagName: 'input',
1619
+ read: getProperty('spellcheck'),
1620
+ },
1621
+ {
1622
+ name: 'spellcheck',
1623
+ overrideStringValue: 'false',
1624
+ tagName: 'input',
1625
+ read: getProperty('spellcheck'),
1626
+ },
1627
+ {
1628
+ name: 'spreadMethod',
1629
+ read: getSVGProperty('spreadMethod'),
1630
+ containerTagName: 'svg',
1631
+ tagName: 'linearGradient',
1632
+ overrideStringValue: 'reflect',
1633
+ },
1634
+ {name: 'src', tagName: 'img', overrideStringValue: 'https://reactjs.com'},
1635
+ {
1636
+ name: 'srcDoc',
1637
+ tagName: 'iframe',
1638
+ overrideStringValue: '<p>Hi</p>',
1639
+ read: getProperty('srcdoc'),
1640
+ },
1641
+ {
1642
+ name: 'srcdoc',
1643
+ tagName: 'iframe',
1644
+ overrideStringValue: '<p>Hi</p>',
1645
+ read: getProperty('srcdoc'),
1646
+ },
1647
+ {
1648
+ name: 'srcLang',
1649
+ containerTagName: 'audio',
1650
+ tagName: 'track',
1651
+ overrideStringValue: 'en',
1652
+ read: getProperty('srclang'),
1653
+ },
1654
+ {
1655
+ name: 'srclang',
1656
+ containerTagName: 'audio',
1657
+ tagName: 'track',
1658
+ overrideStringValue: 'en',
1659
+ read: getProperty('srclang'),
1660
+ },
1661
+ {name: 'srcSet', tagName: 'img'},
1662
+ {name: 'srcset', tagName: 'img'},
1663
+ {name: 'start', tagName: 'ol'},
1664
+ {
1665
+ name: 'startOffset',
1666
+ read: getSVGProperty('startOffset'),
1667
+ containerTagName: 'svg',
1668
+ tagName: 'textPath',
1669
+ },
1670
+ {name: 'state', read: getAttribute('state')},
1671
+ {
1672
+ name: 'stdDeviation',
1673
+ read: getSVGAttribute('stdDeviation'),
1674
+ containerTagName: 'svg',
1675
+ tagName: 'feGaussianBlur',
1676
+ },
1677
+ {
1678
+ name: 'stemh',
1679
+ read: getSVGAttribute('stemh'),
1680
+ containerTagName: 'svg',
1681
+ tagName: 'font-face',
1682
+ },
1683
+ {
1684
+ name: 'stemv',
1685
+ read: getSVGAttribute('stemv'),
1686
+ containerTagName: 'svg',
1687
+ tagName: 'font-face',
1688
+ },
1689
+ {name: 'step', read: getAttribute('step')},
1690
+ {
1691
+ name: 'stitchTiles',
1692
+ read: getSVGProperty('stitchTiles'),
1693
+ containerTagName: 'svg',
1694
+ tagName: 'feTurbulence',
1695
+ overrideStringValue: 'stitch',
1696
+ },
1697
+ {
1698
+ name: 'stop-color',
1699
+ containerTagName: 'svg',
1700
+ tagName: 'stop',
1701
+ read: getSVGAttribute('stop-color'),
1702
+ },
1703
+ {
1704
+ name: 'stop-opacity',
1705
+ containerTagName: 'svg',
1706
+ tagName: 'stop',
1707
+ read: getSVGAttribute('stop-opacity'),
1708
+ },
1709
+ {
1710
+ name: 'stopColor',
1711
+ containerTagName: 'svg',
1712
+ tagName: 'stop',
1713
+ read: getSVGAttribute('stop-color'),
1714
+ },
1715
+ {
1716
+ name: 'stopOpacity',
1717
+ containerTagName: 'svg',
1718
+ tagName: 'stop',
1719
+ read: getSVGAttribute('stop-opacity'),
1720
+ },
1721
+ {
1722
+ name: 'strikethrough-position',
1723
+ read: getSVGAttribute('strikethrough-position'),
1724
+ containerTagName: 'svg',
1725
+ tagName: 'font-face',
1726
+ },
1727
+ {
1728
+ name: 'strikethrough-thickness',
1729
+ read: getSVGAttribute('strikethrough-thickness'),
1730
+ containerTagName: 'svg',
1731
+ tagName: 'font-face',
1732
+ },
1733
+ {
1734
+ name: 'strikethroughPosition',
1735
+ read: getSVGAttribute('strikethrough-position'),
1736
+ containerTagName: 'svg',
1737
+ tagName: 'font-face',
1738
+ },
1739
+ {
1740
+ name: 'strikethroughThickness',
1741
+ read: getSVGAttribute('strikethrough-thickness'),
1742
+ containerTagName: 'svg',
1743
+ tagName: 'font-face',
1744
+ },
1745
+ {
1746
+ name: 'string',
1747
+ read: getSVGAttribute('string'),
1748
+ containerTagName: 'svg',
1749
+ tagName: 'font-face-format',
1750
+ },
1751
+ {
1752
+ name: 'stroke',
1753
+ containerTagName: 'svg',
1754
+ tagName: 'path',
1755
+ read: getSVGAttribute('stroke'),
1756
+ },
1757
+ {
1758
+ name: 'stroke-dasharray',
1759
+ containerTagName: 'svg',
1760
+ tagName: 'path',
1761
+ read: getSVGAttribute('stroke-dasharray'),
1762
+ },
1763
+ {
1764
+ name: 'stroke-Dasharray',
1765
+ containerTagName: 'svg',
1766
+ tagName: 'path',
1767
+ read: getSVGAttribute('stroke-dasharray'),
1768
+ },
1769
+ {
1770
+ name: 'stroke-dashoffset',
1771
+ containerTagName: 'svg',
1772
+ tagName: 'path',
1773
+ read: getSVGAttribute('stroke-dashoffset'),
1774
+ },
1775
+ {
1776
+ name: 'stroke-linecap',
1777
+ containerTagName: 'svg',
1778
+ tagName: 'path',
1779
+ read: getSVGAttribute('stroke-linecap'),
1780
+ },
1781
+ {
1782
+ name: 'stroke-linejoin',
1783
+ containerTagName: 'svg',
1784
+ tagName: 'path',
1785
+ read: getSVGAttribute('stroke-linejoin'),
1786
+ },
1787
+ {
1788
+ name: 'stroke-miterlimit',
1789
+ containerTagName: 'svg',
1790
+ tagName: 'path',
1791
+ read: getSVGAttribute('stroke-miterlimit'),
1792
+ },
1793
+ {
1794
+ name: 'stroke-opacity',
1795
+ containerTagName: 'svg',
1796
+ tagName: 'path',
1797
+ read: getSVGAttribute('stroke-opacity'),
1798
+ },
1799
+ {
1800
+ name: 'stroke-width',
1801
+ containerTagName: 'svg',
1802
+ tagName: 'path',
1803
+ read: getSVGAttribute('stroke-width'),
1804
+ },
1805
+ {
1806
+ name: 'strokeDasharray',
1807
+ containerTagName: 'svg',
1808
+ tagName: 'path',
1809
+ read: getSVGAttribute('stroke-dasharray'),
1810
+ },
1811
+ {
1812
+ name: 'strokeDashoffset',
1813
+ containerTagName: 'svg',
1814
+ tagName: 'path',
1815
+ read: getSVGAttribute('stroke-dashoffset'),
1816
+ },
1817
+ {
1818
+ name: 'strokeLinecap',
1819
+ containerTagName: 'svg',
1820
+ tagName: 'path',
1821
+ read: getSVGAttribute('stroke-linecap'),
1822
+ },
1823
+ {
1824
+ name: 'strokeLinejoin',
1825
+ containerTagName: 'svg',
1826
+ tagName: 'path',
1827
+ read: getSVGAttribute('stroke-linejoin'),
1828
+ },
1829
+ {
1830
+ name: 'strokeMiterlimit',
1831
+ containerTagName: 'svg',
1832
+ tagName: 'path',
1833
+ read: getSVGAttribute('stroke-miterlimit'),
1834
+ },
1835
+ {
1836
+ name: 'strokeOpacity',
1837
+ containerTagName: 'svg',
1838
+ tagName: 'path',
1839
+ read: getSVGAttribute('stroke-opacity'),
1840
+ },
1841
+ {
1842
+ name: 'strokeWidth',
1843
+ containerTagName: 'svg',
1844
+ tagName: 'path',
1845
+ read: getSVGAttribute('stroke-width'),
1846
+ },
1847
+ {name: 'style'},
1848
+ {name: 'summary', tagName: 'table'},
1849
+ {
1850
+ name: 'suppressContentEditableWarning',
1851
+ read: getAttribute('suppresscontenteditablewarning'),
1852
+ },
1853
+ {
1854
+ name: 'surfaceScale',
1855
+ read: getSVGProperty('surfaceScale'),
1856
+ containerTagName: 'svg',
1857
+ tagName: 'feDiffuseLighting',
1858
+ },
1859
+ {
1860
+ name: 'systemLanguage',
1861
+ overrideStringValue: 'en',
1862
+ read: getSVGProperty('systemLanguage'),
1863
+ containerTagName: 'svg',
1864
+ tagName: 'a',
1865
+ },
1866
+ {name: 'tabIndex'},
1867
+ {
1868
+ name: 'tableValues',
1869
+ read: getSVGProperty('tableValues'),
1870
+ containerTagName: 'svg',
1871
+ tagName: 'feFuncA',
1872
+ overrideStringValue: '0 1 2 3',
1873
+ },
1874
+ {
1875
+ name: 'target',
1876
+ read: getSVGProperty('target'),
1877
+ containerTagName: 'svg',
1878
+ tagName: 'a',
1879
+ },
1880
+ {
1881
+ name: 'targetX',
1882
+ read: getSVGProperty('targetX'),
1883
+ containerTagName: 'svg',
1884
+ tagName: 'feConvolveMatrix',
1885
+ },
1886
+ {
1887
+ name: 'targetY',
1888
+ read: getSVGProperty('targetY'),
1889
+ containerTagName: 'svg',
1890
+ tagName: 'feConvolveMatrix',
1891
+ },
1892
+ {
1893
+ name: 'text-anchor',
1894
+ containerTagName: 'svg',
1895
+ tagName: 'text',
1896
+ read: getSVGAttribute('text-anchor'),
1897
+ },
1898
+ {
1899
+ name: 'text-decoration',
1900
+ containerTagName: 'svg',
1901
+ tagName: 'text',
1902
+ read: getSVGAttribute('text-decoration'),
1903
+ },
1904
+ {
1905
+ name: 'text-rendering',
1906
+ tagName: 'svg',
1907
+ read: getSVGAttribute('text-rendering'),
1908
+ },
1909
+ {
1910
+ name: 'textAnchor',
1911
+ containerTagName: 'svg',
1912
+ tagName: 'text',
1913
+ read: getSVGAttribute('text-anchor'),
1914
+ },
1915
+ {
1916
+ name: 'textDecoration',
1917
+ containerTagName: 'svg',
1918
+ tagName: 'text',
1919
+ read: getSVGAttribute('text-decoration'),
1920
+ },
1921
+ {
1922
+ name: 'textLength',
1923
+ read: getSVGProperty('textLength'),
1924
+ containerTagName: 'svg',
1925
+ tagName: 'text',
1926
+ },
1927
+ {
1928
+ name: 'textRendering',
1929
+ tagName: 'svg',
1930
+ read: getSVGAttribute('text-rendering'),
1931
+ },
1932
+ {name: 'title'},
1933
+ {
1934
+ name: 'to',
1935
+ read: getSVGAttribute('to'),
1936
+ containerTagName: 'svg',
1937
+ tagName: 'set',
1938
+ },
1939
+ {
1940
+ name: 'transform',
1941
+ read: getSVGProperty('transform'),
1942
+ containerTagName: 'svg',
1943
+ tagName: 'a',
1944
+ overrideStringValue: 'translate(-10,-20) scale(2) rotate(45) translate(5,10)',
1945
+ },
1946
+ {name: 'type', tagName: 'button', overrideStringValue: 'reset'},
1947
+ {
1948
+ name: 'type',
1949
+ containerTagName: 'svg',
1950
+ tagName: 'feFuncA',
1951
+ read: getSVGProperty('type'),
1952
+ overrideStringValue: 'discrete',
1953
+ },
1954
+ {name: 'typeof', read: getAttribute('typeof')},
1955
+ {
1956
+ name: 'u1',
1957
+ read: getSVGAttribute('u1'),
1958
+ containerTagName: 'svg',
1959
+ tagName: 'hkern',
1960
+ },
1961
+ {
1962
+ name: 'u2',
1963
+ read: getSVGAttribute('u2'),
1964
+ containerTagName: 'svg',
1965
+ tagName: 'hkern',
1966
+ },
1967
+ {
1968
+ name: 'underline-position',
1969
+ read: getSVGAttribute('underline-position'),
1970
+ containerTagName: 'svg',
1971
+ tagName: 'font-face',
1972
+ },
1973
+ {
1974
+ name: 'underline-thickness',
1975
+ read: getSVGAttribute('underline-thickness'),
1976
+ containerTagName: 'svg',
1977
+ tagName: 'font-face',
1978
+ },
1979
+ {
1980
+ name: 'underlinePosition',
1981
+ read: getSVGAttribute('underline-position'),
1982
+ containerTagName: 'svg',
1983
+ tagName: 'font-face',
1984
+ },
1985
+ {
1986
+ name: 'underlineThickness',
1987
+ read: getSVGAttribute('underline-thickness'),
1988
+ containerTagName: 'svg',
1989
+ tagName: 'font-face',
1990
+ },
1991
+ {
1992
+ name: 'unicode',
1993
+ read: getSVGAttribute('unicode'),
1994
+ containerTagName: 'svg',
1995
+ tagName: 'glyph',
1996
+ },
1997
+ {
1998
+ name: 'unicode-bidi',
1999
+ containerTagName: 'svg',
2000
+ tagName: 'text',
2001
+ read: getSVGAttribute('unicode-bidi'),
2002
+ },
2003
+ {
2004
+ name: 'unicode-range',
2005
+ read: getSVGAttribute('unicode-range'),
2006
+ containerTagName: 'svg',
2007
+ tagName: 'font-face',
2008
+ },
2009
+ {
2010
+ name: 'unicodeBidi',
2011
+ containerTagName: 'svg',
2012
+ tagName: 'text',
2013
+ read: getSVGAttribute('unicode-bidi'),
2014
+ },
2015
+ {
2016
+ name: 'unicodeRange',
2017
+ read: getSVGAttribute('unicode-range'),
2018
+ containerTagName: 'svg',
2019
+ tagName: 'font-face',
2020
+ },
2021
+ {
2022
+ name: 'units-per-em',
2023
+ read: getSVGAttribute('units-per-em'),
2024
+ containerTagName: 'svg',
2025
+ tagName: 'font-face',
2026
+ },
2027
+ {
2028
+ name: 'unitsPerEm',
2029
+ read: getSVGAttribute('unites-per-em'),
2030
+ containerTagName: 'svg',
2031
+ tagName: 'font-face',
2032
+ },
2033
+ {name: 'unknown', read: getAttribute('unknown')},
2034
+ {
2035
+ name: 'unselectable',
2036
+ read: getAttribute('unselectable'),
2037
+ tagName: 'span',
2038
+ overrideStringValue: 'on',
2039
+ },
2040
+ {name: 'useMap', tagName: 'img'},
2041
+ {
2042
+ name: 'v-alphabetic',
2043
+ read: getSVGAttribute('v-alphabetic'),
2044
+ containerTagName: 'svg',
2045
+ tagName: 'font-face',
2046
+ },
2047
+ {
2048
+ name: 'v-hanging',
2049
+ read: getSVGAttribute('v-hanging'),
2050
+ containerTagName: 'svg',
2051
+ tagName: 'font-face',
2052
+ },
2053
+ {
2054
+ name: 'v-ideographic',
2055
+ read: getSVGAttribute('v-ideographic'),
2056
+ containerTagName: 'svg',
2057
+ tagName: 'font-face',
2058
+ },
2059
+ {
2060
+ name: 'v-mathematical',
2061
+ read: getSVGAttribute('v-mathematical'),
2062
+ containerTagName: 'svg',
2063
+ tagName: 'font-face',
2064
+ },
2065
+ {
2066
+ name: 'vAlphabetic',
2067
+ read: getSVGAttribute('v-alphabetic'),
2068
+ containerTagName: 'svg',
2069
+ tagName: 'font-face',
2070
+ },
2071
+ {name: 'value', tagName: 'input', extraProps: {onChange() {}}},
2072
+ {name: 'value', tagName: 'input', type: 'email', extraProps: {onChange() {}}},
2073
+ {
2074
+ name: 'value',
2075
+ tagName: 'input',
2076
+ type: 'number',
2077
+ extraProps: {onChange() {}},
2078
+ },
2079
+ {name: 'value', tagName: 'textarea', extraProps: {onChange() {}}},
2080
+ {
2081
+ name: 'value',
2082
+ containerTagName: 'select',
2083
+ tagName: 'option',
2084
+ extraProps: {onChange() {}},
2085
+ },
2086
+ {
2087
+ name: 'Value',
2088
+ containerTagName: 'select',
2089
+ tagName: 'option',
2090
+ read: getProperty('value'),
2091
+ },
2092
+ {
2093
+ name: 'values',
2094
+ read: getSVGProperty('values'),
2095
+ containerTagName: 'svg',
2096
+ tagName: 'feColorMatrix',
2097
+ overrideStringValue: '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0',
2098
+ },
2099
+ {
2100
+ name: 'vector-effect',
2101
+ containerTagName: 'svg',
2102
+ tagName: 'line',
2103
+ read: getSVGAttribute('vector-effect'),
2104
+ },
2105
+ {
2106
+ name: 'vectorEffect',
2107
+ containerTagName: 'svg',
2108
+ tagName: 'line',
2109
+ read: getSVGAttribute('vector-effect'),
2110
+ },
2111
+ {name: 'version', containerTagName: 'document', tagName: 'html'},
2112
+ {name: 'version', tagName: 'svg', read: getSVGAttribute('version')},
2113
+ {
2114
+ name: 'vert-adv-y',
2115
+ read: getSVGAttribute('vert-origin-y'),
2116
+ containerTagName: 'svg',
2117
+ tagName: 'font',
2118
+ },
2119
+ {
2120
+ name: 'vert-origin-x',
2121
+ read: getSVGAttribute('vert-origin-y'),
2122
+ containerTagName: 'svg',
2123
+ tagName: 'font',
2124
+ },
2125
+ {
2126
+ name: 'vert-origin-y',
2127
+ read: getSVGAttribute('vert-origin-y'),
2128
+ containerTagName: 'svg',
2129
+ tagName: 'font',
2130
+ },
2131
+ {
2132
+ name: 'vertAdvY',
2133
+ read: getSVGAttribute('vert-adv-y'),
2134
+ containerTagName: 'svg',
2135
+ tagName: 'font',
2136
+ },
2137
+ {
2138
+ name: 'vertOriginX',
2139
+ read: getSVGAttribute('vert-origin-x'),
2140
+ containerTagName: 'svg',
2141
+ tagName: 'font',
2142
+ },
2143
+ {
2144
+ name: 'vertOriginY',
2145
+ read: getSVGAttribute('vert-origin-y'),
2146
+ containerTagName: 'svg',
2147
+ tagName: 'font',
2148
+ },
2149
+ {
2150
+ name: 'vHanging',
2151
+ read: getSVGAttribute('v-hanging'),
2152
+ containerTagName: 'svg',
2153
+ tagName: 'font-face',
2154
+ },
2155
+ {
2156
+ name: 'vIdeographic',
2157
+ read: getSVGAttribute('v-ideographic'),
2158
+ containerTagName: 'svg',
2159
+ tagName: 'font-face',
2160
+ },
2161
+ {
2162
+ name: 'viewBox',
2163
+ read: getSVGProperty('viewBox'),
2164
+ containerTagName: 'svg',
2165
+ tagName: 'marker',
2166
+ overrideStringValue: '0 0 1500 1000',
2167
+ },
2168
+ {
2169
+ name: 'viewTarget',
2170
+ read: getSVGAttribute('viewTarget'),
2171
+ containerTagName: 'svg',
2172
+ tagName: 'view',
2173
+ },
2174
+ {name: 'visibility', read: getAttribute('visibility')},
2175
+ {
2176
+ name: 'visibility',
2177
+ containerTagName: 'svg',
2178
+ tagName: 'path',
2179
+ read: getSVGAttribute('visibility'),
2180
+ },
2181
+ {
2182
+ name: 'vMathematical',
2183
+ read: getSVGAttribute('v-mathematical'),
2184
+ containerTagName: 'svg',
2185
+ tagName: 'font-face',
2186
+ },
2187
+ {name: 'vocab', read: getAttribute('vocab')},
2188
+ {name: 'width', tagName: 'img'},
2189
+ {
2190
+ name: 'width',
2191
+ containerTagName: 'svg',
2192
+ tagName: 'rect',
2193
+ read: getSVGProperty('width'),
2194
+ },
2195
+ {
2196
+ name: 'widths',
2197
+ read: getSVGAttribute('widths'),
2198
+ containerTagName: 'svg',
2199
+ tagName: 'font-face',
2200
+ },
2201
+ {name: 'wmode', read: getAttribute('wmode'), tagName: 'embed'},
2202
+ {
2203
+ name: 'word-spacing',
2204
+ containerTagName: 'svg',
2205
+ tagName: 'text',
2206
+ read: getSVGAttribute('word-spacing'),
2207
+ },
2208
+ {
2209
+ name: 'wordSpacing',
2210
+ containerTagName: 'svg',
2211
+ tagName: 'text',
2212
+ read: getSVGAttribute('word-spacing'),
2213
+ },
2214
+ {name: 'wrap', tagName: 'textarea'},
2215
+ {
2216
+ name: 'writing-mode',
2217
+ containerTagName: 'svg',
2218
+ tagName: 'text',
2219
+ read: getSVGAttribute('writing-mode'),
2220
+ },
2221
+ {
2222
+ name: 'writingMode',
2223
+ containerTagName: 'svg',
2224
+ tagName: 'text',
2225
+ read: getSVGAttribute('writing-mode'),
2226
+ },
2227
+ {
2228
+ name: 'x',
2229
+ read: getSVGAttribute('x'),
2230
+ containerTagName: 'svg',
2231
+ tagName: 'altGlyph',
2232
+ },
2233
+ {
2234
+ name: 'x-height',
2235
+ read: getSVGAttribute('x-height'),
2236
+ containerTagName: 'svg',
2237
+ tagName: 'font-face',
2238
+ },
2239
+ {
2240
+ name: 'x1',
2241
+ read: getSVGProperty('x1'),
2242
+ containerTagName: 'svg',
2243
+ tagName: 'line',
2244
+ },
2245
+ {
2246
+ name: 'x2',
2247
+ read: getSVGProperty('x2'),
2248
+ containerTagName: 'svg',
2249
+ tagName: 'line',
2250
+ },
2251
+ {
2252
+ name: 'xChannelSelector',
2253
+ read: getSVGProperty('xChannelSelector'),
2254
+ containerTagName: 'svg',
2255
+ tagName: 'feDisplacementMap',
2256
+ overrideStringValue: 'R',
2257
+ },
2258
+ {
2259
+ name: 'xHeight',
2260
+ read: getSVGAttribute('x-height'),
2261
+ containerTagName: 'svg',
2262
+ tagName: 'font-face',
2263
+ },
2264
+ {name: 'XLink:Actuate', read: getAttribute('XLink:Actuate')},
2265
+ {name: 'xlink:actuate', read: getAttribute('xlink:actuate')},
2266
+ {name: 'xlink:arcrole', read: getAttribute('xlink:arcrole')},
2267
+ {name: 'xlink:href', read: getAttribute('xlink:href')},
2268
+ {name: 'xlink:role', read: getAttribute('xlink:role')},
2269
+ {name: 'xlink:show', read: getAttribute('xlink:show')},
2270
+ {name: 'xlink:title', read: getAttribute('xlink:title')},
2271
+ {name: 'xlink:type', read: getAttribute('xlink:type')},
2272
+ {name: 'xlinkActuate', read: getAttribute('xlink:actuate')},
2273
+ {name: 'XlinkActuate', read: getAttribute('Xlink:actuate')},
2274
+ {name: 'xlinkArcrole', read: getAttribute('xlink:arcrole')},
2275
+ {name: 'xlinkHref', read: getAttribute('xlink:href')},
2276
+ {name: 'xlinkRole', read: getAttribute('xlink:role')},
2277
+ {name: 'xlinkShow', read: getAttribute('xlink:show')},
2278
+ {name: 'xlinkTitle', read: getAttribute('xlink:title')},
2279
+ {name: 'xlinkType', read: getAttribute('xlink:type')},
2280
+ {name: 'xml:base', read: getAttribute('xml:base')},
2281
+ {name: 'xml:lang', read: getAttribute('xml:lang')},
2282
+ {name: 'xml:space', read: getAttribute('xml:space')},
2283
+ {name: 'xmlBase', read: getAttribute('xml:base')},
2284
+ {name: 'xmlLang', read: getAttribute('xml:lang')},
2285
+ {name: 'xmlns', read: getProperty('namespaceURI'), tagName: 'svg'},
2286
+ {name: 'xmlns:xlink', read: getAttribute('xmlns:xlink')},
2287
+ {name: 'xmlnsXlink', read: getAttribute('xmlns:xlink')},
2288
+ {name: 'xmlSpace', read: getAttribute('xml:space')},
2289
+ {
2290
+ name: 'y',
2291
+ read: getSVGAttribute('y'),
2292
+ containerTagName: 'svg',
2293
+ tagName: 'altGlyph',
2294
+ },
2295
+ {
2296
+ name: 'y1',
2297
+ read: getSVGProperty('y1'),
2298
+ containerTagName: 'svg',
2299
+ tagName: 'line',
2300
+ },
2301
+ {
2302
+ name: 'y2',
2303
+ read: getSVGProperty('y2'),
2304
+ containerTagName: 'svg',
2305
+ tagName: 'line',
2306
+ },
2307
+ {
2308
+ name: 'yChannelSelector',
2309
+ read: getSVGProperty('yChannelSelector'),
2310
+ containerTagName: 'svg',
2311
+ tagName: 'feDisplacementMap',
2312
+ overrideStringValue: 'B',
2313
+ },
2314
+ {
2315
+ name: 'z',
2316
+ read: getSVGProperty('z'),
2317
+ containerTagName: 'svg',
2318
+ tagName: 'fePointLight',
2319
+ },
2320
+ {name: 'zoomAndPan', read: getSVGProperty('zoomAndPan'), tagName: 'svg'},
2321
+];
2322
+
2323
+attributes.forEach(attr => {
2324
+ attr.read = attr.read || getProperty(attr.name);
2325
+});
2326
+
2327
+export default attributes;
fixtures/attribute-behavior/src/index.js
+4
-29
@@ -1,31 +1,6 @@
1
-import {loadScript} from './react-loader';
1
import './index.css';
2
+import React from 'react';
3
+import ReactDOM from 'react-dom';
4
+import App from './App';
5
4
-(async function foo() {
5
- await loadScript('https://unpkg.com/react@15.6.1/dist/react.js');
6
- await loadScript('https://unpkg.com/react-dom@15.6.1/dist/react-dom.js');
7
- await loadScript(
8
- 'https://unpkg.com/react-dom@15.6.1/dist/react-dom-server.js'
9
- );
10
- window.React15 = window.React;
11
- window.ReactDOM15 = window.ReactDOM;
12
- window.ReactDOMServer15 = window.ReactDOMServer;
13
- delete window.React;
14
- delete window.ReactDOM;
15
- delete window.ReactDOMServer;
16
-
17
- await loadScript('/react.development.js');
18
- await loadScript('/react-dom.development.js');
19
- await loadScript('/react-dom-server.browser.development.js');
20
-
21
- const React = (window.React16 = window.React);
22
- const ReactDOM = (window.ReactDOM16 = window.ReactDOM);
23
- window.ReactDOMServer16 = window.ReactDOMServer;
24
-
25
- const App = await import('./App');
26
-
27
- ReactDOM.render(
28
- React.createElement(App.default),
29
- document.getElementById('root')
30
- );
31
-})();
6
+ReactDOM.render(<App />, document.getElementById('root'));
fixtures/attribute-behavior/src/react-loader.js
deleted
-15
@@ -1,15 +0,0 @@
1
-export function loadScript(src) {
2
- let firstScript = document.getElementsByTagName('script')[0];
3
- let scriptNode;
4
-
5
- return new Promise((resolve, reject) => {
6
- scriptNode = document.createElement('script');
7
- scriptNode.async = 1;
8
- scriptNode.src = src;
9
-
10
- scriptNode.onload = () => resolve();
11
- scriptNode.onerror = () => reject(new Error(`failed to load: ${src}`));
12
-
13
- firstScript.parentNode.insertBefore(scriptNode, firstScript);
14
- });
15
-}
fixtures/attribute-behavior/yarn.lock
+4
@@ -2516,6 +2516,10 @@ file-loader@0.11.2:
2516
dependencies:
2517
loader-utils "^1.0.2"
2518
2519
+file-saver@^1.3.3:
2520
+ version "1.3.3"
2521
+ resolved "https://registry.yarnpkg.com/file-saver/-/file-saver-1.3.3.tgz#cdd4c44d3aa264eac2f68ec165bc791c34af1232"
2522
+
2523
filename-regex@^2.0.0:
2524
version "2.0.1"
2525
resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"