| 1 | /** |
| 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | * |
| 4 | * This source code is licensed under the MIT license found in the |
| 5 | * LICENSE file in the root directory of this source tree. |
| 6 | */ |
| 7 | |
| 8 | // When adding attributes to the HTML or SVG allowed attribute list, be sure to |
| 9 | // also add them to this module to ensure casing and incorrect name |
| 10 | // warnings. |
| 11 | const possibleStandardNames = { |
| 12 | // HTML |
| 13 | accept: 'accept', |
| 14 | acceptcharset: 'acceptCharset', |
| 15 | 'accept-charset': 'acceptCharset', |
| 16 | accesskey: 'accessKey', |
| 17 | action: 'action', |
| 18 | allowfullscreen: 'allowFullScreen', |
| 19 | alt: 'alt', |
| 20 | as: 'as', |
| 21 | async: 'async', |
| 22 | autocapitalize: 'autoCapitalize', |
| 23 | autocomplete: 'autoComplete', |
| 24 | autocorrect: 'autoCorrect', |
| 25 | autofocus: 'autoFocus', |
| 26 | autoplay: 'autoPlay', |
| 27 | autosave: 'autoSave', |
| 28 | capture: 'capture', |
| 29 | cellpadding: 'cellPadding', |
| 30 | cellspacing: 'cellSpacing', |
| 31 | challenge: 'challenge', |
| 32 | charset: 'charSet', |
| 33 | checked: 'checked', |
| 34 | children: 'children', |
| 35 | cite: 'cite', |
| 36 | class: 'className', |
| 37 | classid: 'classID', |
| 38 | classname: 'className', |
| 39 | cols: 'cols', |
| 40 | colspan: 'colSpan', |
| 41 | content: 'content', |
| 42 | contenteditable: 'contentEditable', |
| 43 | contextmenu: 'contextMenu', |
| 44 | controls: 'controls', |
| 45 | controlslist: 'controlsList', |
| 46 | coords: 'coords', |
| 47 | credentialless: 'credentialless', |
| 48 | crossorigin: 'crossOrigin', |
| 49 | dangerouslysetinnerhtml: 'dangerouslySetInnerHTML', |
| 50 | data: 'data', |
| 51 | datetime: 'dateTime', |
| 52 | default: 'default', |
| 53 | defaultchecked: 'defaultChecked', |
| 54 | defaultvalue: 'defaultValue', |
| 55 | defer: 'defer', |
| 56 | dir: 'dir', |
| 57 | disabled: 'disabled', |
| 58 | disablepictureinpicture: 'disablePictureInPicture', |
| 59 | disableremoteplayback: 'disableRemotePlayback', |
| 60 | download: 'download', |
| 61 | draggable: 'draggable', |
| 62 | enctype: 'encType', |
| 63 | enterkeyhint: 'enterKeyHint', |
| 64 | fetchpriority: 'fetchPriority', |
| 65 | for: 'htmlFor', |
| 66 | form: 'form', |
| 67 | formmethod: 'formMethod', |
| 68 | formaction: 'formAction', |
| 69 | formenctype: 'formEncType', |
| 70 | formnovalidate: 'formNoValidate', |
| 71 | formtarget: 'formTarget', |
| 72 | frameborder: 'frameBorder', |
| 73 | headers: 'headers', |
| 74 | height: 'height', |
| 75 | hidden: 'hidden', |
| 76 | high: 'high', |
| 77 | href: 'href', |
| 78 | hreflang: 'hrefLang', |
| 79 | htmlfor: 'htmlFor', |
| 80 | httpequiv: 'httpEquiv', |
| 81 | 'http-equiv': 'httpEquiv', |
| 82 | icon: 'icon', |
| 83 | id: 'id', |
| 84 | imagesizes: 'imageSizes', |
| 85 | imagesrcset: 'imageSrcSet', |
| 86 | inert: 'inert', |
| 87 | innerhtml: 'innerHTML', |
| 88 | inputmode: 'inputMode', |
| 89 | integrity: 'integrity', |
| 90 | is: 'is', |
| 91 | itemid: 'itemID', |
| 92 | itemprop: 'itemProp', |
| 93 | itemref: 'itemRef', |
| 94 | itemscope: 'itemScope', |
| 95 | itemtype: 'itemType', |
| 96 | keyparams: 'keyParams', |
| 97 | keytype: 'keyType', |
| 98 | kind: 'kind', |
| 99 | label: 'label', |
| 100 | lang: 'lang', |
| 101 | list: 'list', |
| 102 | loop: 'loop', |
| 103 | low: 'low', |
| 104 | manifest: 'manifest', |
| 105 | marginwidth: 'marginWidth', |
| 106 | marginheight: 'marginHeight', |
| 107 | max: 'max', |
| 108 | maxlength: 'maxLength', |
| 109 | media: 'media', |
| 110 | mediagroup: 'mediaGroup', |
| 111 | method: 'method', |
| 112 | min: 'min', |
| 113 | minlength: 'minLength', |
| 114 | multiple: 'multiple', |
| 115 | muted: 'muted', |
| 116 | name: 'name', |
| 117 | nomodule: 'noModule', |
| 118 | nonce: 'nonce', |
| 119 | novalidate: 'noValidate', |
| 120 | open: 'open', |
| 121 | optimum: 'optimum', |
| 122 | pattern: 'pattern', |
| 123 | placeholder: 'placeholder', |
| 124 | playsinline: 'playsInline', |
| 125 | poster: 'poster', |
| 126 | preload: 'preload', |
| 127 | profile: 'profile', |
| 128 | radiogroup: 'radioGroup', |
| 129 | readonly: 'readOnly', |
| 130 | referrerpolicy: 'referrerPolicy', |
| 131 | rel: 'rel', |
| 132 | required: 'required', |
| 133 | reversed: 'reversed', |
| 134 | role: 'role', |
| 135 | rows: 'rows', |
| 136 | rowspan: 'rowSpan', |
| 137 | sandbox: 'sandbox', |
| 138 | scope: 'scope', |
| 139 | scoped: 'scoped', |
| 140 | scrolling: 'scrolling', |
| 141 | seamless: 'seamless', |
| 142 | selected: 'selected', |
| 143 | shape: 'shape', |
| 144 | size: 'size', |
| 145 | sizes: 'sizes', |
| 146 | span: 'span', |
| 147 | spellcheck: 'spellCheck', |
| 148 | src: 'src', |
| 149 | srcdoc: 'srcDoc', |
| 150 | srclang: 'srcLang', |
| 151 | srcset: 'srcSet', |
| 152 | start: 'start', |
| 153 | step: 'step', |
| 154 | style: 'style', |
| 155 | summary: 'summary', |
| 156 | tabindex: 'tabIndex', |
| 157 | target: 'target', |
| 158 | title: 'title', |
| 159 | type: 'type', |
| 160 | usemap: 'useMap', |
| 161 | value: 'value', |
| 162 | width: 'width', |
| 163 | wmode: 'wmode', |
| 164 | wrap: 'wrap', |
| 165 | |
| 166 | // SVG |
| 167 | about: 'about', |
| 168 | accentheight: 'accentHeight', |
| 169 | 'accent-height': 'accentHeight', |
| 170 | accumulate: 'accumulate', |
| 171 | additive: 'additive', |
| 172 | alignmentbaseline: 'alignmentBaseline', |
| 173 | 'alignment-baseline': 'alignmentBaseline', |
| 174 | allowreorder: 'allowReorder', |
| 175 | alphabetic: 'alphabetic', |
| 176 | amplitude: 'amplitude', |
| 177 | arabicform: 'arabicForm', |
| 178 | 'arabic-form': 'arabicForm', |
| 179 | ascent: 'ascent', |
| 180 | attributename: 'attributeName', |
| 181 | attributetype: 'attributeType', |
| 182 | autoreverse: 'autoReverse', |
| 183 | azimuth: 'azimuth', |
| 184 | basefrequency: 'baseFrequency', |
| 185 | baselineshift: 'baselineShift', |
| 186 | 'baseline-shift': 'baselineShift', |
| 187 | baseprofile: 'baseProfile', |
| 188 | bbox: 'bbox', |
| 189 | begin: 'begin', |
| 190 | bias: 'bias', |
| 191 | by: 'by', |
| 192 | calcmode: 'calcMode', |
| 193 | capheight: 'capHeight', |
| 194 | 'cap-height': 'capHeight', |
| 195 | clip: 'clip', |
| 196 | clippath: 'clipPath', |
| 197 | 'clip-path': 'clipPath', |
| 198 | clippathunits: 'clipPathUnits', |
| 199 | cliprule: 'clipRule', |
| 200 | 'clip-rule': 'clipRule', |
| 201 | color: 'color', |
| 202 | colorinterpolation: 'colorInterpolation', |
| 203 | 'color-interpolation': 'colorInterpolation', |
| 204 | colorinterpolationfilters: 'colorInterpolationFilters', |
| 205 | 'color-interpolation-filters': 'colorInterpolationFilters', |
| 206 | colorprofile: 'colorProfile', |
| 207 | 'color-profile': 'colorProfile', |
| 208 | colorrendering: 'colorRendering', |
| 209 | 'color-rendering': 'colorRendering', |
| 210 | contentscripttype: 'contentScriptType', |
| 211 | contentstyletype: 'contentStyleType', |
| 212 | cursor: 'cursor', |
| 213 | cx: 'cx', |
| 214 | cy: 'cy', |
| 215 | d: 'd', |
| 216 | datatype: 'datatype', |
| 217 | decelerate: 'decelerate', |
| 218 | descent: 'descent', |
| 219 | diffuseconstant: 'diffuseConstant', |
| 220 | direction: 'direction', |
| 221 | display: 'display', |
| 222 | divisor: 'divisor', |
| 223 | dominantbaseline: 'dominantBaseline', |
| 224 | 'dominant-baseline': 'dominantBaseline', |
| 225 | dur: 'dur', |
| 226 | dx: 'dx', |
| 227 | dy: 'dy', |
| 228 | edgemode: 'edgeMode', |
| 229 | elevation: 'elevation', |
| 230 | enablebackground: 'enableBackground', |
| 231 | 'enable-background': 'enableBackground', |
| 232 | end: 'end', |
| 233 | exponent: 'exponent', |
| 234 | externalresourcesrequired: 'externalResourcesRequired', |
| 235 | fill: 'fill', |
| 236 | fillopacity: 'fillOpacity', |
| 237 | 'fill-opacity': 'fillOpacity', |
| 238 | fillrule: 'fillRule', |
| 239 | 'fill-rule': 'fillRule', |
| 240 | filter: 'filter', |
| 241 | filterres: 'filterRes', |
| 242 | filterunits: 'filterUnits', |
| 243 | floodopacity: 'floodOpacity', |
| 244 | 'flood-opacity': 'floodOpacity', |
| 245 | floodcolor: 'floodColor', |
| 246 | 'flood-color': 'floodColor', |
| 247 | focusable: 'focusable', |
| 248 | fontfamily: 'fontFamily', |
| 249 | 'font-family': 'fontFamily', |
| 250 | fontsize: 'fontSize', |
| 251 | 'font-size': 'fontSize', |
| 252 | fontsizeadjust: 'fontSizeAdjust', |
| 253 | 'font-size-adjust': 'fontSizeAdjust', |
| 254 | fontstretch: 'fontStretch', |
| 255 | 'font-stretch': 'fontStretch', |
| 256 | fontstyle: 'fontStyle', |
| 257 | 'font-style': 'fontStyle', |
| 258 | fontvariant: 'fontVariant', |
| 259 | 'font-variant': 'fontVariant', |
| 260 | fontweight: 'fontWeight', |
| 261 | 'font-weight': 'fontWeight', |
| 262 | format: 'format', |
| 263 | from: 'from', |
| 264 | fx: 'fx', |
| 265 | fy: 'fy', |
| 266 | g1: 'g1', |
| 267 | g2: 'g2', |
| 268 | glyphname: 'glyphName', |
| 269 | 'glyph-name': 'glyphName', |
| 270 | glyphorientationhorizontal: 'glyphOrientationHorizontal', |
| 271 | 'glyph-orientation-horizontal': 'glyphOrientationHorizontal', |
| 272 | glyphorientationvertical: 'glyphOrientationVertical', |
| 273 | 'glyph-orientation-vertical': 'glyphOrientationVertical', |
| 274 | glyphref: 'glyphRef', |
| 275 | gradienttransform: 'gradientTransform', |
| 276 | gradientunits: 'gradientUnits', |
| 277 | hanging: 'hanging', |
| 278 | horizadvx: 'horizAdvX', |
| 279 | 'horiz-adv-x': 'horizAdvX', |
| 280 | horizoriginx: 'horizOriginX', |
| 281 | 'horiz-origin-x': 'horizOriginX', |
| 282 | ideographic: 'ideographic', |
| 283 | imagerendering: 'imageRendering', |
| 284 | 'image-rendering': 'imageRendering', |
| 285 | in2: 'in2', |
| 286 | in: 'in', |
| 287 | inlist: 'inlist', |
| 288 | intercept: 'intercept', |
| 289 | k1: 'k1', |
| 290 | k2: 'k2', |
| 291 | k3: 'k3', |
| 292 | k4: 'k4', |
| 293 | k: 'k', |
| 294 | kernelmatrix: 'kernelMatrix', |
| 295 | kernelunitlength: 'kernelUnitLength', |
| 296 | kerning: 'kerning', |
| 297 | keypoints: 'keyPoints', |
| 298 | keysplines: 'keySplines', |
| 299 | keytimes: 'keyTimes', |
| 300 | lengthadjust: 'lengthAdjust', |
| 301 | letterspacing: 'letterSpacing', |
| 302 | 'letter-spacing': 'letterSpacing', |
| 303 | lightingcolor: 'lightingColor', |
| 304 | 'lighting-color': 'lightingColor', |
| 305 | limitingconeangle: 'limitingConeAngle', |
| 306 | local: 'local', |
| 307 | markerend: 'markerEnd', |
| 308 | 'marker-end': 'markerEnd', |
| 309 | markerheight: 'markerHeight', |
| 310 | markermid: 'markerMid', |
| 311 | 'marker-mid': 'markerMid', |
| 312 | markerstart: 'markerStart', |
| 313 | 'marker-start': 'markerStart', |
| 314 | markerunits: 'markerUnits', |
| 315 | markerwidth: 'markerWidth', |
| 316 | mask: 'mask', |
| 317 | maskcontentunits: 'maskContentUnits', |
| 318 | masktype: 'maskType', |
| 319 | maskunits: 'maskUnits', |
| 320 | mathematical: 'mathematical', |
| 321 | mode: 'mode', |
| 322 | numoctaves: 'numOctaves', |
| 323 | offset: 'offset', |
| 324 | opacity: 'opacity', |
| 325 | operator: 'operator', |
| 326 | order: 'order', |
| 327 | orient: 'orient', |
| 328 | orientation: 'orientation', |
| 329 | origin: 'origin', |
| 330 | overflow: 'overflow', |
| 331 | overlineposition: 'overlinePosition', |
| 332 | 'overline-position': 'overlinePosition', |
| 333 | overlinethickness: 'overlineThickness', |
| 334 | 'overline-thickness': 'overlineThickness', |
| 335 | paintorder: 'paintOrder', |
| 336 | 'paint-order': 'paintOrder', |
| 337 | panose1: 'panose1', |
| 338 | 'panose-1': 'panose1', |
| 339 | pathlength: 'pathLength', |
| 340 | patterncontentunits: 'patternContentUnits', |
| 341 | patterntransform: 'patternTransform', |
| 342 | patternunits: 'patternUnits', |
| 343 | pointerevents: 'pointerEvents', |
| 344 | 'pointer-events': 'pointerEvents', |
| 345 | points: 'points', |
| 346 | pointsatx: 'pointsAtX', |
| 347 | pointsaty: 'pointsAtY', |
| 348 | pointsatz: 'pointsAtZ', |
| 349 | popover: 'popover', |
| 350 | popovertarget: 'popoverTarget', |
| 351 | popovertargetaction: 'popoverTargetAction', |
| 352 | prefix: 'prefix', |
| 353 | preservealpha: 'preserveAlpha', |
| 354 | preserveaspectratio: 'preserveAspectRatio', |
| 355 | primitiveunits: 'primitiveUnits', |
| 356 | property: 'property', |
| 357 | r: 'r', |
| 358 | radius: 'radius', |
| 359 | refx: 'refX', |
| 360 | refy: 'refY', |
| 361 | renderingintent: 'renderingIntent', |
| 362 | 'rendering-intent': 'renderingIntent', |
| 363 | repeatcount: 'repeatCount', |
| 364 | repeatdur: 'repeatDur', |
| 365 | requiredextensions: 'requiredExtensions', |
| 366 | requiredfeatures: 'requiredFeatures', |
| 367 | resource: 'resource', |
| 368 | restart: 'restart', |
| 369 | result: 'result', |
| 370 | results: 'results', |
| 371 | rotate: 'rotate', |
| 372 | rx: 'rx', |
| 373 | ry: 'ry', |
| 374 | scale: 'scale', |
| 375 | security: 'security', |
| 376 | seed: 'seed', |
| 377 | shaperendering: 'shapeRendering', |
| 378 | 'shape-rendering': 'shapeRendering', |
| 379 | slope: 'slope', |
| 380 | spacing: 'spacing', |
| 381 | specularconstant: 'specularConstant', |
| 382 | specularexponent: 'specularExponent', |
| 383 | speed: 'speed', |
| 384 | spreadmethod: 'spreadMethod', |
| 385 | startoffset: 'startOffset', |
| 386 | stddeviation: 'stdDeviation', |
| 387 | stemh: 'stemh', |
| 388 | stemv: 'stemv', |
| 389 | stitchtiles: 'stitchTiles', |
| 390 | stopcolor: 'stopColor', |
| 391 | 'stop-color': 'stopColor', |
| 392 | stopopacity: 'stopOpacity', |
| 393 | 'stop-opacity': 'stopOpacity', |
| 394 | strikethroughposition: 'strikethroughPosition', |
| 395 | 'strikethrough-position': 'strikethroughPosition', |
| 396 | strikethroughthickness: 'strikethroughThickness', |
| 397 | 'strikethrough-thickness': 'strikethroughThickness', |
| 398 | string: 'string', |
| 399 | stroke: 'stroke', |
| 400 | strokedasharray: 'strokeDasharray', |
| 401 | 'stroke-dasharray': 'strokeDasharray', |
| 402 | strokedashoffset: 'strokeDashoffset', |
| 403 | 'stroke-dashoffset': 'strokeDashoffset', |
| 404 | strokelinecap: 'strokeLinecap', |
| 405 | 'stroke-linecap': 'strokeLinecap', |
| 406 | strokelinejoin: 'strokeLinejoin', |
| 407 | 'stroke-linejoin': 'strokeLinejoin', |
| 408 | strokemiterlimit: 'strokeMiterlimit', |
| 409 | 'stroke-miterlimit': 'strokeMiterlimit', |
| 410 | strokewidth: 'strokeWidth', |
| 411 | 'stroke-width': 'strokeWidth', |
| 412 | strokeopacity: 'strokeOpacity', |
| 413 | 'stroke-opacity': 'strokeOpacity', |
| 414 | suppresscontenteditablewarning: 'suppressContentEditableWarning', |
| 415 | suppresshydrationwarning: 'suppressHydrationWarning', |
| 416 | surfacescale: 'surfaceScale', |
| 417 | systemlanguage: 'systemLanguage', |
| 418 | tablevalues: 'tableValues', |
| 419 | targetx: 'targetX', |
| 420 | targety: 'targetY', |
| 421 | textanchor: 'textAnchor', |
| 422 | 'text-anchor': 'textAnchor', |
| 423 | textdecoration: 'textDecoration', |
| 424 | 'text-decoration': 'textDecoration', |
| 425 | textlength: 'textLength', |
| 426 | textrendering: 'textRendering', |
| 427 | 'text-rendering': 'textRendering', |
| 428 | to: 'to', |
| 429 | transform: 'transform', |
| 430 | transformorigin: 'transformOrigin', |
| 431 | 'transform-origin': 'transformOrigin', |
| 432 | typeof: 'typeof', |
| 433 | u1: 'u1', |
| 434 | u2: 'u2', |
| 435 | underlineposition: 'underlinePosition', |
| 436 | 'underline-position': 'underlinePosition', |
| 437 | underlinethickness: 'underlineThickness', |
| 438 | 'underline-thickness': 'underlineThickness', |
| 439 | unicode: 'unicode', |
| 440 | unicodebidi: 'unicodeBidi', |
| 441 | 'unicode-bidi': 'unicodeBidi', |
| 442 | unicoderange: 'unicodeRange', |
| 443 | 'unicode-range': 'unicodeRange', |
| 444 | unitsperem: 'unitsPerEm', |
| 445 | 'units-per-em': 'unitsPerEm', |
| 446 | unselectable: 'unselectable', |
| 447 | valphabetic: 'vAlphabetic', |
| 448 | 'v-alphabetic': 'vAlphabetic', |
| 449 | values: 'values', |
| 450 | vectoreffect: 'vectorEffect', |
| 451 | 'vector-effect': 'vectorEffect', |
| 452 | version: 'version', |
| 453 | vertadvy: 'vertAdvY', |
| 454 | 'vert-adv-y': 'vertAdvY', |
| 455 | vertoriginx: 'vertOriginX', |
| 456 | 'vert-origin-x': 'vertOriginX', |
| 457 | vertoriginy: 'vertOriginY', |
| 458 | 'vert-origin-y': 'vertOriginY', |
| 459 | vhanging: 'vHanging', |
| 460 | 'v-hanging': 'vHanging', |
| 461 | videographic: 'vIdeographic', |
| 462 | 'v-ideographic': 'vIdeographic', |
| 463 | viewbox: 'viewBox', |
| 464 | viewtarget: 'viewTarget', |
| 465 | visibility: 'visibility', |
| 466 | vmathematical: 'vMathematical', |
| 467 | 'v-mathematical': 'vMathematical', |
| 468 | vocab: 'vocab', |
| 469 | widths: 'widths', |
| 470 | wordspacing: 'wordSpacing', |
| 471 | 'word-spacing': 'wordSpacing', |
| 472 | writingmode: 'writingMode', |
| 473 | 'writing-mode': 'writingMode', |
| 474 | x1: 'x1', |
| 475 | x2: 'x2', |
| 476 | x: 'x', |
| 477 | xchannelselector: 'xChannelSelector', |
| 478 | xheight: 'xHeight', |
| 479 | 'x-height': 'xHeight', |
| 480 | xlinkactuate: 'xlinkActuate', |
| 481 | 'xlink:actuate': 'xlinkActuate', |
| 482 | xlinkarcrole: 'xlinkArcrole', |
| 483 | 'xlink:arcrole': 'xlinkArcrole', |
| 484 | xlinkhref: 'xlinkHref', |
| 485 | 'xlink:href': 'xlinkHref', |
| 486 | xlinkrole: 'xlinkRole', |
| 487 | 'xlink:role': 'xlinkRole', |
| 488 | xlinkshow: 'xlinkShow', |
| 489 | 'xlink:show': 'xlinkShow', |
| 490 | xlinktitle: 'xlinkTitle', |
| 491 | 'xlink:title': 'xlinkTitle', |
| 492 | xlinktype: 'xlinkType', |
| 493 | 'xlink:type': 'xlinkType', |
| 494 | xmlbase: 'xmlBase', |
| 495 | 'xml:base': 'xmlBase', |
| 496 | xmllang: 'xmlLang', |
| 497 | 'xml:lang': 'xmlLang', |
| 498 | xmlns: 'xmlns', |
| 499 | 'xml:space': 'xmlSpace', |
| 500 | xmlnsxlink: 'xmlnsXlink', |
| 501 | 'xmlns:xlink': 'xmlnsXlink', |
| 502 | xmlspace: 'xmlSpace', |
| 503 | y1: 'y1', |
| 504 | y2: 'y2', |
| 505 | y: 'y', |
| 506 | ychannelselector: 'yChannelSelector', |
| 507 | z: 'z', |
| 508 | zoomandpan: 'zoomAndPan', |
| 509 | }; |
| 510 | |
| 511 | export default possibleStandardNames; |