@@ -224,79 +224,19 @@ export default class AttributeWrapper {
224
224
}
225
225
}
226
226
227
- // source: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
228
227
const attribute_lookup = {
229
- accept : { applies_to : [ 'form' , 'input' ] } ,
230
- 'accept-charset' : { property_name : 'acceptCharset' , applies_to : [ 'form' ] } ,
231
- accesskey : { property_name : 'accessKey' } ,
232
- action : { applies_to : [ 'form' ] } ,
233
- align : {
234
- applies_to : [
235
- 'applet' ,
236
- 'caption' ,
237
- 'col' ,
238
- 'colgroup' ,
239
- 'hr' ,
240
- 'iframe' ,
241
- 'img' ,
242
- 'table' ,
243
- 'tbody' ,
244
- 'td' ,
245
- 'tfoot' ,
246
- 'th' ,
247
- 'thead' ,
248
- 'tr' ,
249
- ] ,
250
- } ,
251
228
allowfullscreen : { property_name : 'allowFullscreen' , applies_to : [ 'iframe' ] } ,
252
- alt : { applies_to : [ 'applet ', 'area' , 'img' , 'input '] } ,
229
+ allowpaymentrequest : { property_name : 'allowPaymentRequest ', applies_to : [ 'iframe '] } ,
253
230
async : { applies_to : [ 'script' ] } ,
254
- autocomplete : { applies_to : [ 'form' , 'input' ] } ,
255
231
autofocus : { applies_to : [ 'button' , 'input' , 'keygen' , 'select' , 'textarea' ] } ,
256
232
autoplay : { applies_to : [ 'audio' , 'video' ] } ,
257
- autosave : { applies_to : [ 'input' ] } ,
258
- bgcolor : {
259
- property_name : 'bgColor' ,
260
- applies_to : [
261
- 'body' ,
262
- 'col' ,
263
- 'colgroup' ,
264
- 'marquee' ,
265
- 'table' ,
266
- 'tbody' ,
267
- 'tfoot' ,
268
- 'td' ,
269
- 'th' ,
270
- 'tr' ,
271
- ] ,
272
- } ,
273
- border : { applies_to : [ 'img' , 'object' , 'table' ] } ,
274
- buffered : { applies_to : [ 'audio' , 'video' ] } ,
275
- challenge : { applies_to : [ 'keygen' ] } ,
276
- charset : { applies_to : [ 'meta' , 'script' ] } ,
277
233
checked : { applies_to : [ 'command' , 'input' ] } ,
278
- cite : { applies_to : [ 'blockquote' , 'del' , 'ins' , 'q' ] } ,
279
- class : { property_name : 'className' } ,
280
- code : { applies_to : [ 'applet' ] } ,
281
- codebase : { property_name : 'codeBase' , applies_to : [ 'applet' ] } ,
282
- color : { applies_to : [ 'basefont' , 'font' , 'hr' ] } ,
283
- cols : { applies_to : [ 'textarea' ] } ,
284
- colspan : { property_name : 'colSpan' , applies_to : [ 'td' , 'th' ] } ,
285
- content : { applies_to : [ 'meta' ] } ,
286
- contenteditable : { property_name : 'contentEditable' } ,
287
- contextmenu : { } ,
288
234
controls : { applies_to : [ 'audio' , 'video' ] } ,
289
- coords : { applies_to : [ 'area' ] } ,
290
- data : { applies_to : [ 'object' ] } ,
291
- datetime : { property_name : 'dateTime' , applies_to : [ 'del' , 'ins' , 'time' ] } ,
292
235
default : { applies_to : [ 'track' ] } ,
293
236
defer : { applies_to : [ 'script' ] } ,
294
- dir : { } ,
295
- dirname : { property_name : 'dirName' , applies_to : [ 'input' , 'textarea' ] } ,
296
237
disabled : {
297
238
applies_to : [
298
239
'button' ,
299
- 'command' ,
300
240
'fieldset' ,
301
241
'input' ,
302
242
'keygen' ,
@@ -306,119 +246,21 @@ const attribute_lookup = {
306
246
'textarea' ,
307
247
] ,
308
248
} ,
309
- download : { applies_to : [ 'a' , 'area' ] } ,
310
- draggable : { } ,
311
- dropzone : { } ,
312
- enctype : { applies_to : [ 'form' ] } ,
313
- for : { property_name : 'htmlFor' , applies_to : [ 'label' , 'output' ] } ,
314
- formaction : { applies_to : [ 'input' , 'button' ] } ,
315
- headers : { applies_to : [ 'td' , 'th' ] } ,
316
- height : {
317
- applies_to : [ 'canvas' , 'embed' , 'iframe' , 'img' , 'input' , 'object' , 'video' ] ,
318
- } ,
249
+ formnovalidate : { property_name : 'formNoValidate' , applies_to : [ 'button' , 'input' ] } ,
319
250
hidden : { } ,
320
- high : { applies_to : [ 'meter' ] } ,
321
- href : { applies_to : [ 'a' , 'area' , 'base' , 'link' ] } ,
322
- hreflang : { applies_to : [ 'a' , 'area' , 'link' ] } ,
323
- 'http-equiv' : { property_name : 'httpEquiv' , applies_to : [ 'meta' ] } ,
324
- icon : { applies_to : [ 'command' ] } ,
325
- id : { } ,
326
251
indeterminate : { applies_to : [ 'input' ] } ,
327
252
ismap : { property_name : 'isMap' , applies_to : [ 'img' ] } ,
328
- itemprop : { } ,
329
- keytype : { applies_to : [ 'keygen' ] } ,
330
- kind : { applies_to : [ 'track' ] } ,
331
- label : { applies_to : [ 'track' ] } ,
332
- lang : { } ,
333
- language : { applies_to : [ 'script' ] } ,
334
- loop : { applies_to : [ 'audio' , 'bgsound' , 'marquee' , 'video' ] } ,
335
- low : { applies_to : [ 'meter' ] } ,
336
- manifest : { applies_to : [ 'html' ] } ,
337
- max : { applies_to : [ 'input' , 'meter' , 'progress' ] } ,
338
- maxlength : { property_name : 'maxLength' , applies_to : [ 'input' , 'textarea' ] } ,
339
- media : { applies_to : [ 'a' , 'area' , 'link' , 'source' , 'style' ] } ,
340
- method : { applies_to : [ 'form' ] } ,
341
- min : { applies_to : [ 'input' , 'meter' ] } ,
253
+ loop : { applies_to : [ 'audio' , 'bgsound' , 'video' ] } ,
342
254
multiple : { applies_to : [ 'input' , 'select' ] } ,
343
255
muted : { applies_to : [ 'audio' , 'video' ] } ,
344
- name : {
345
- applies_to : [
346
- 'button' ,
347
- 'form' ,
348
- 'fieldset' ,
349
- 'iframe' ,
350
- 'input' ,
351
- 'keygen' ,
352
- 'object' ,
353
- 'output' ,
354
- 'select' ,
355
- 'textarea' ,
356
- 'map' ,
357
- 'meta' ,
358
- 'param' ,
359
- ] ,
360
- } ,
256
+ nomodule : { property_name : 'noModule' , applies_to : [ 'script' ] } ,
361
257
novalidate : { property_name : 'noValidate' , applies_to : [ 'form' ] } ,
362
- open : { applies_to : [ 'details' ] } ,
363
- optimum : { applies_to : [ 'meter' ] } ,
364
- pattern : { applies_to : [ 'input' ] } ,
365
- ping : { applies_to : [ 'a' , 'area' ] } ,
366
- placeholder : { applies_to : [ 'input' , 'textarea' ] } ,
367
- poster : { applies_to : [ 'video' ] } ,
368
- preload : { applies_to : [ 'audio' , 'video' ] } ,
369
- radiogroup : { applies_to : [ 'command' ] } ,
258
+ open : { applies_to : [ 'details' , 'dialog' ] } ,
259
+ playsinline : { property_name : 'playsInline' , applies_to : [ 'video' ] } ,
370
260
readonly : { property_name : 'readOnly' , applies_to : [ 'input' , 'textarea' ] } ,
371
- rel : { applies_to : [ 'a' , 'area' , 'link' ] } ,
372
261
required : { applies_to : [ 'input' , 'select' , 'textarea' ] } ,
373
262
reversed : { applies_to : [ 'ol' ] } ,
374
- rows : { applies_to : [ 'textarea' ] } ,
375
- rowspan : { property_name : 'rowSpan' , applies_to : [ 'td' , 'th' ] } ,
376
- sandbox : { applies_to : [ 'iframe' ] } ,
377
- scope : { applies_to : [ 'th' ] } ,
378
- scoped : { applies_to : [ 'style' ] } ,
379
- seamless : { applies_to : [ 'iframe' ] } ,
380
263
selected : { applies_to : [ 'option' ] } ,
381
- shape : { applies_to : [ 'a' , 'area' ] } ,
382
- size : { applies_to : [ 'input' , 'select' ] } ,
383
- sizes : { applies_to : [ 'link' , 'img' , 'source' ] } ,
384
- span : { applies_to : [ 'col' , 'colgroup' ] } ,
385
- spellcheck : { } ,
386
- src : {
387
- applies_to : [
388
- 'audio' ,
389
- 'embed' ,
390
- 'iframe' ,
391
- 'img' ,
392
- 'input' ,
393
- 'script' ,
394
- 'source' ,
395
- 'track' ,
396
- 'video' ,
397
- ] ,
398
- } ,
399
- srcdoc : { applies_to : [ 'iframe' ] } ,
400
- srclang : { applies_to : [ 'track' ] } ,
401
- srcset : { applies_to : [ 'img' ] } ,
402
- start : { applies_to : [ 'ol' ] } ,
403
- step : { applies_to : [ 'input' ] } ,
404
- style : { property_name : 'style.cssText' } ,
405
- summary : { applies_to : [ 'table' ] } ,
406
- tabindex : { property_name : 'tabIndex' } ,
407
- target : { applies_to : [ 'a' , 'area' , 'base' , 'form' ] } ,
408
- title : { } ,
409
- type : {
410
- applies_to : [
411
- 'button' ,
412
- 'command' ,
413
- 'embed' ,
414
- 'object' ,
415
- 'script' ,
416
- 'source' ,
417
- 'style' ,
418
- 'menu' ,
419
- ] ,
420
- } ,
421
- usemap : { property_name : 'useMap' , applies_to : [ 'img' , 'input' , 'object' ] } ,
422
264
value : {
423
265
applies_to : [
424
266
'button' ,
@@ -432,12 +274,6 @@ const attribute_lookup = {
432
274
'textarea' ,
433
275
] ,
434
276
} ,
435
- volume : { applies_to : [ 'audio' , 'video' ] } ,
436
- playbackRate : { applies_to : [ 'audio' , 'video' ] } ,
437
- width : {
438
- applies_to : [ 'canvas' , 'embed' , 'iframe' , 'img' , 'input' , 'object' , 'video' ] ,
439
- } ,
440
- wrap : { applies_to : [ 'textarea' ] } ,
441
277
} ;
442
278
443
279
Object . keys ( attribute_lookup ) . forEach ( name => {
0 commit comments