| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- 'use strict'
- var types = require('./util/types')
- var create = require('./util/create')
- var caseInsensitiveTransform = require('./util/case-insensitive-transform')
- var boolean = types.boolean
- var overloadedBoolean = types.overloadedBoolean
- var booleanish = types.booleanish
- var number = types.number
- var spaceSeparated = types.spaceSeparated
- var commaSeparated = types.commaSeparated
- module.exports = create({
- space: 'html',
- attributes: {
- acceptcharset: 'accept-charset',
- classname: 'class',
- htmlfor: 'for',
- httpequiv: 'http-equiv'
- },
- transform: caseInsensitiveTransform,
- mustUseProperty: ['checked', 'multiple', 'muted', 'selected'],
- properties: {
- // Standard Properties.
- abbr: null,
- accept: commaSeparated,
- acceptCharset: spaceSeparated,
- accessKey: spaceSeparated,
- action: null,
- allowFullScreen: boolean,
- allowPaymentRequest: boolean,
- allowUserMedia: boolean,
- alt: null,
- as: null,
- async: boolean,
- autoCapitalize: null,
- autoComplete: spaceSeparated,
- autoFocus: boolean,
- autoPlay: boolean,
- capture: boolean,
- charSet: null,
- checked: boolean,
- cite: null,
- className: spaceSeparated,
- cols: number,
- colSpan: null,
- content: null,
- contentEditable: booleanish,
- controls: boolean,
- controlsList: spaceSeparated,
- coords: number | commaSeparated,
- crossOrigin: null,
- data: null,
- dateTime: null,
- decoding: null,
- default: boolean,
- defer: boolean,
- dir: null,
- dirName: null,
- disabled: boolean,
- download: overloadedBoolean,
- draggable: booleanish,
- encType: null,
- form: null,
- formAction: null,
- formEncType: null,
- formMethod: null,
- formNoValidate: boolean,
- formTarget: null,
- headers: spaceSeparated,
- height: number,
- hidden: boolean,
- high: number,
- href: null,
- hrefLang: null,
- htmlFor: spaceSeparated,
- httpEquiv: spaceSeparated,
- id: null,
- inputMode: null,
- integrity: null,
- is: null,
- isMap: boolean,
- itemId: null,
- itemProp: spaceSeparated,
- itemRef: spaceSeparated,
- itemScope: boolean,
- itemType: spaceSeparated,
- kind: null,
- label: null,
- lang: null,
- language: null,
- list: null,
- loop: boolean,
- low: number,
- manifest: null,
- max: null,
- maxLength: number,
- media: null,
- method: null,
- min: null,
- minLength: number,
- multiple: boolean,
- muted: boolean,
- name: null,
- nonce: null,
- noModule: boolean,
- noValidate: boolean,
- open: boolean,
- optimum: number,
- pattern: null,
- ping: spaceSeparated,
- placeholder: null,
- playsInline: boolean,
- poster: null,
- preload: null,
- readOnly: boolean,
- referrerPolicy: null,
- rel: spaceSeparated,
- required: boolean,
- reversed: boolean,
- rows: number,
- rowSpan: number,
- sandbox: spaceSeparated,
- scope: null,
- scoped: boolean,
- seamless: boolean,
- selected: boolean,
- shape: null,
- size: number,
- sizes: spaceSeparated,
- slot: null,
- span: number,
- spellCheck: booleanish,
- src: null,
- srcDoc: null,
- srcLang: null,
- srcSet: commaSeparated,
- start: number,
- step: null,
- style: null,
- tabIndex: number,
- target: null,
- title: null,
- translate: null,
- type: null,
- typeMustMatch: boolean,
- useMap: null,
- value: booleanish,
- width: number,
- wrap: null,
- // Legacy.
- // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
- align: null, // Several. Use CSS `text-align` instead,
- aLink: null, // `<body>`. Use CSS `a:active {color}` instead
- archive: spaceSeparated, // `<object>`. List of URIs to archives
- axis: null, // `<td>` and `<th>`. Use `scope` on `<th>`
- background: null, // `<body>`. Use CSS `background-image` instead
- bgColor: null, // `<body>` and table elements. Use CSS `background-color` instead
- border: number, // `<table>`. Use CSS `border-width` instead,
- borderColor: null, // `<table>`. Use CSS `border-color` instead,
- bottomMargin: number, // `<body>`
- cellPadding: null, // `<table>`
- cellSpacing: null, // `<table>`
- char: null, // Several table elements. When `align=char`, sets the character to align on
- charOff: null, // Several table elements. When `char`, offsets the alignment
- classId: null, // `<object>`
- clear: null, // `<br>`. Use CSS `clear` instead
- code: null, // `<object>`
- codeBase: null, // `<object>`
- codeType: null, // `<object>`
- color: null, // `<font>` and `<hr>`. Use CSS instead
- compact: boolean, // Lists. Use CSS to reduce space between items instead
- declare: boolean, // `<object>`
- event: null, // `<script>`
- face: null, // `<font>`. Use CSS instead
- frame: null, // `<table>`
- frameBorder: null, // `<iframe>`. Use CSS `border` instead
- hSpace: number, // `<img>` and `<object>`
- leftMargin: number, // `<body>`
- link: null, // `<body>`. Use CSS `a:link {color: *}` instead
- longDesc: null, // `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
- lowSrc: null, // `<img>`. Use a `<picture>`
- marginHeight: number, // `<body>`
- marginWidth: number, // `<body>`
- noResize: boolean, // `<frame>`
- noHref: boolean, // `<area>`. Use no href instead of an explicit `nohref`
- noShade: boolean, // `<hr>`. Use background-color and height instead of borders
- noWrap: boolean, // `<td>` and `<th>`
- object: null, // `<applet>`
- profile: null, // `<head>`
- prompt: null, // `<isindex>`
- rev: null, // `<link>`
- rightMargin: number, // `<body>`
- rules: null, // `<table>`
- scheme: null, // `<meta>`
- scrolling: booleanish, // `<frame>`. Use overflow in the child context
- standby: null, // `<object>`
- summary: null, // `<table>`
- text: null, // `<body>`. Use CSS `color` instead
- topMargin: number, // `<body>`
- valueType: null, // `<param>`
- version: null, // `<html>`. Use a doctype.
- vAlign: null, // Several. Use CSS `vertical-align` instead
- vLink: null, // `<body>`. Use CSS `a:visited {color}` instead
- vSpace: number, // `<img>` and `<object>`
- // Non-standard Properties.
- allowTransparency: null,
- autoCorrect: null,
- autoSave: null,
- prefix: null,
- property: null,
- results: number,
- security: null,
- unselectable: null
- }
- })
|