|
| 1 | +/** |
| 2 | + * Mapping of standard HTML attributes to their React counterparts |
| 3 | + * List taken and reversed from react/src/renderers/dom/shared/HTMLDOMPropertyConfig.js |
| 4 | + * https://github.com/facebook/react/blob/c9c3c339b757682f1154f1c915eb55e6a8766933/src/renderers/dom/shared/HTMLDOMPropertyConfig.js |
| 5 | + * @type {Object} |
| 6 | + */ |
| 7 | +export default { |
| 8 | + /** |
| 9 | + * Standard Properties |
| 10 | + */ |
| 11 | + accept: 'accept', |
| 12 | + 'accept-charset': 'acceptCharset', |
| 13 | + accesskey: 'accessKey', |
| 14 | + action: 'action', |
| 15 | + allowfullscreen: 'allowFullScreen', |
| 16 | + allowtransparency: 'allowTransparency', |
| 17 | + alt: 'alt', |
| 18 | + async: 'async', |
| 19 | + autocomplete: 'autoComplete', |
| 20 | + autoplay: 'autoPlay', |
| 21 | + capture: 'capture', |
| 22 | + cellpadding: 'cellPadding', |
| 23 | + cellspacing: 'cellSpacing', |
| 24 | + charset: 'charSet', |
| 25 | + challenge: 'challenge', |
| 26 | + checked: 'checked', |
| 27 | + classid: 'classID', |
| 28 | + class: 'className', |
| 29 | + cols: 'cols', |
| 30 | + colspan: 'colSpan', |
| 31 | + content: 'content', |
| 32 | + contenteditable: 'contentEditable', |
| 33 | + contextmenu: 'contextMenu', |
| 34 | + controls: 'controls', |
| 35 | + coords: 'coords', |
| 36 | + crossorigin: 'crossOrigin', |
| 37 | + data: 'data', |
| 38 | + datetime: 'dateTime', |
| 39 | + default: 'default', |
| 40 | + defer: 'defer', |
| 41 | + dir: 'dir', |
| 42 | + disabled: 'disabled', |
| 43 | + download: 'download', |
| 44 | + draggable: 'draggable', |
| 45 | + enctype: 'encType', |
| 46 | + form: 'form', |
| 47 | + formaction: 'formAction', |
| 48 | + formenctype: 'formEncType', |
| 49 | + formmethod: 'formMethod', |
| 50 | + formnovalidate: 'formNoValidate', |
| 51 | + formtarget: 'formTarget', |
| 52 | + frameborder: 'frameBorder', |
| 53 | + headers: 'headers', |
| 54 | + height: 'height', |
| 55 | + hidden: 'hidden', |
| 56 | + high: 'high', |
| 57 | + href: 'href', |
| 58 | + hreflang: 'hrefLang', |
| 59 | + for: 'htmlFor', |
| 60 | + 'http-equiv': 'httpEquiv', |
| 61 | + icon: 'icon', |
| 62 | + id: 'id', |
| 63 | + inputmode: 'inputMode', |
| 64 | + integrity: 'integrity', |
| 65 | + is: 'is', |
| 66 | + keyparams: 'keyParams', |
| 67 | + keytype: 'keyType', |
| 68 | + kind: 'kind', |
| 69 | + label: 'label', |
| 70 | + lang: 'lang', |
| 71 | + list: 'list', |
| 72 | + loop: 'loop', |
| 73 | + low: 'low', |
| 74 | + manifest: 'manifest', |
| 75 | + marginheight: 'marginHeight', |
| 76 | + marginwidth: 'marginWidth', |
| 77 | + max: 'max', |
| 78 | + maxlength: 'maxLength', |
| 79 | + media: 'media', |
| 80 | + mediagroup: 'mediaGroup', |
| 81 | + method: 'method', |
| 82 | + min: 'min', |
| 83 | + minlength: 'minLength', |
| 84 | + multiple: 'multiple', |
| 85 | + muted: 'muted', |
| 86 | + name: 'name', |
| 87 | + nonce: 'nonce', |
| 88 | + novalidate: 'noValidate', |
| 89 | + open: 'open', |
| 90 | + optimum: 'optimum', |
| 91 | + pattern: 'pattern', |
| 92 | + placeholder: 'placeholder', |
| 93 | + poster: 'poster', |
| 94 | + preload: 'preload', |
| 95 | + radiogroup: 'radioGroup', |
| 96 | + readonly: 'readOnly', |
| 97 | + rel: 'rel', |
| 98 | + required: 'required', |
| 99 | + reversed: 'reversed', |
| 100 | + role: 'role', |
| 101 | + rows: 'rows', |
| 102 | + rowspan: 'rowSpan', |
| 103 | + sandbox: 'sandbox', |
| 104 | + scope: 'scope', |
| 105 | + scoped: 'scoped', |
| 106 | + scrolling: 'scrolling', |
| 107 | + seamless: 'seamless', |
| 108 | + selected: 'selected', |
| 109 | + shape: 'shape', |
| 110 | + size: 'size', |
| 111 | + sizes: 'sizes', |
| 112 | + span: 'span', |
| 113 | + spellcheck: 'spellCheck', |
| 114 | + src: 'src', |
| 115 | + srcdoc: 'srcDoc', |
| 116 | + srclang: 'srcLang', |
| 117 | + srcset: 'srcSet', |
| 118 | + start: 'start', |
| 119 | + step: 'step', |
| 120 | + style: 'style', |
| 121 | + summary: 'summary', |
| 122 | + tabindex: 'tabIndex', |
| 123 | + target: 'target', |
| 124 | + title: 'title', |
| 125 | + type: 'type', |
| 126 | + usemap: 'useMap', |
| 127 | + value: 'value', |
| 128 | + width: 'width', |
| 129 | + wmode: 'wmode', |
| 130 | + wrap: 'wrap', |
| 131 | + /** |
| 132 | + * RDFa Properties |
| 133 | + */ |
| 134 | + about: 'about', |
| 135 | + datatype: 'datatype', |
| 136 | + inlist: 'inlist', |
| 137 | + prefix: 'prefix', |
| 138 | + property: 'property', |
| 139 | + resource: 'resource', |
| 140 | + typeof: 'typeof', |
| 141 | + vocab: 'vocab', |
| 142 | + /** |
| 143 | + * Non-standard Properties |
| 144 | + */ |
| 145 | + autocapitalize: 'autoCapitalize', |
| 146 | + autocorrect: 'autoCorrect', |
| 147 | + autosave: 'autoSave', |
| 148 | + color: 'color', |
| 149 | + itemprop: 'itemProp', |
| 150 | + itemscope: 'itemScope', |
| 151 | + itemtype: 'itemType', |
| 152 | + itemid: 'itemID', |
| 153 | + itemref: 'itemRef', |
| 154 | + results: 'results', |
| 155 | + security: 'security', |
| 156 | + unselectable: 'unselectable', |
| 157 | + autofocus: 'autoFocus' |
| 158 | +}; |
0 commit comments