Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
344 changes: 172 additions & 172 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,180 +1,180 @@
const DOMProps = {
"abbr": "abbr",
"accept": "accept",
"acceptCharset": "accept-charset",
"accessKey": "accesskey",
"action": "action",
"allowFullScreen": "allowfullscreen",
"allowTransparency": "allowtransparency",
"alt": "alt",
"async": "async",
"autoComplete": "autocomplete",
"autoFocus": "autofocus",
"autoPlay": "autoplay",
"cellPadding": "cellpadding",
"cellSpacing": "cellspacing",
"challenge": "challenge",
"charset": "charset",
"checked": "checked",
"cite": "cite",
"class": "class",
"className": "class",
"cols": "cols",
"colSpan": "colspan",
"command": "command",
"content": "content",
"contentEditable": "contenteditable",
"contextMenu": "contextmenu",
"controls": "controls",
"coords": "coords",
"crossOrigin": "crossorigin",
"data": "data",
"dateTime": "datetime",
"default": "default",
"defer": "defer",
"dir": "dir",
"disabled": "disabled",
"download": "download",
"draggable": "draggable",
"dropzone": "dropzone",
"encType": "enctype",
"for": "for",
"form": "form",
"formAction": "formaction",
"formEncType": "formenctype",
"formMethod": "formmethod",
"formNoValidate": "formnovalidate",
"formTarget": "formtarget",
"frameBorder": "frameBorder",
"headers": "headers",
"height": "height",
"hidden": "hidden",
"high": "high",
"href": "href",
"hrefLang": "hreflang",
"htmlFor": "for",
"httpEquiv": "http-equiv",
"icon": "icon",
"id": "id",
"inputMode": "inputmode",
"isMap": "ismap",
"itemId": "itemid",
"itemProp": "itemprop",
"itemRef": "itemref",
"itemScope": "itemscope",
"itemType": "itemtype",
"kind": "kind",
"label": "label",
"lang": "lang",
"list": "list",
"loop": "loop",
"manifest": "manifest",
"max": "max",
"maxLength": "maxlength",
"media": "media",
"mediaGroup": "mediagroup",
"method": "method",
"min": "min",
"minLength": "minlength",
"multiple": "multiple",
"muted": "muted",
"name": "name",
"noValidate": "novalidate",
"open": "open",
"optimum": "optimum",
"pattern": "pattern",
"ping": "ping",
"placeholder": "placeholder",
"poster": "poster",
"preload": "preload",
"radioGroup": "radiogroup",
"readOnly": "readonly",
"rel": "rel",
"required": "required",
"role": "role",
"rows": "rows",
"rowSpan": "rowspan",
"sandbox": "sandbox",
"scope": "scope",
"scoped": "scoped",
"scrolling": "scrolling",
"seamless": "seamless",
"selected": "selected",
"shape": "shape",
"size": "size",
"sizes": "sizes",
"sortable": "sortable",
"span": "span",
"spellCheck": "spellcheck",
"src": "src",
"srcDoc": "srcdoc",
"srcSet": "srcset",
"start": "start",
"step": "step",
"style": "style",
"tabIndex": "tabindex",
"target": "target",
"title": "title",
"translate": "translate",
"type": "type",
"typeMustMatch": "typemustmatch",
"useMap": "usemap",
"value": "value",
"width": "width",
"wmode": "wmode",
"wrap": "wrap",
"onCopy": "onCopy",
"onCut": "onCut",
"onPaste": "onPaste",
"onLoad": "onLoad",
"onError": "onError",
"onWheel": "onWheel",
"onScroll": "onScroll",
"onCompositionEnd": "onCompositionEnd",
"onCompositionStart": "onCompositionStart",
"onCompositionUpdate": "onCompositionUpdate",
"onKeyDown": "onKeyDown",
"onKeyPress": "onKeyPress",
"onKeyUp": "onKeyUp",
"onFocus": "onFocus",
"onBlur": "onBlur",
"onChange": "onChange",
"onInput": "onInput",
"onSubmit": "onSubmit",
"onClick": "onClick",
"onContextMenu": "onContextMenu",
"onDoubleClick": "onDoubleClick",
"onDrag": "onDrag",
"onDragEnd": "onDragEnd",
"onDragEnter": "onDragEnter",
"onDragExit": "onDragExit",
"onDragLeave": "onDragLeave",
"onDragOver": "onDragOver",
"onDragStart": "onDragStart",
"onDrop": "onDrop",
"onMouseDown": "onMouseDown",
"onMouseEnter": "onMouseEnter",
"onMouseLeave": "onMouseLeave",
"onMouseMove": "onMouseMove",
"onMouseOut": "onMouseOut",
"onMouseOver": "onMouseOver",
"onMouseUp": "onMouseUp",
"onSelect": "onSelect",
"onTouchCancel": "onTouchCancel",
"onTouchEnd": "onTouchEnd",
"onTouchMove": "onTouchMove",
"onTouchStart": "onTouchStart",
"onAnimationStart": "onAnimationStart",
"onAnimationEnd": "onAnimationEnd",
"onAnimationIteration": "onAnimationIteration",
"onTransitionEnd": "onTransitionEnd"
};
const DOMProps = [
"abbr",
"accept",
"acceptCharset",
"accessKey",
"action",
"allowFullScreen",
"allowTransparency",
"alt",
"async",
"autoComplete",
"autoFocus",
"autoPlay",
"cellPadding",
"cellSpacing",
"challenge",
"charset",
"checked",
"cite",
"class",
"className",
"cols",
"colSpan",
"command",
"content",
"contentEditable",
"contextMenu",
"controls",
"coords",
"crossOrigin",
"data",
"dateTime",
"default",
"defer",
"dir",
"disabled",
"download",
"draggable",
"dropzone",
"encType",
"for",
"form",
"formAction",
"formEncType",
"formMethod",
"formNoValidate",
"formTarget",
"frameBorder",
"headers",
"height",
"hidden",
"high",
"href",
"hrefLang",
"htmlFor",
"httpEquiv",
"icon",
"id",
"inputMode",
"isMap",
"itemId",
"itemProp",
"itemRef",
"itemScope",
"itemType",
"kind",
"label",
"lang",
"list",
"loop",
"manifest",
"max",
"maxLength",
"media",
"mediaGroup",
"method",
"min",
"minLength",
"multiple",
"muted",
"name",
"noValidate",
"open",
"optimum",
"pattern",
"ping",
"placeholder",
"poster",
"preload",
"radioGroup",
"readOnly",
"rel",
"required",
"role",
"rows",
"rowSpan",
"sandbox",
"scope",
"scoped",
"scrolling",
"seamless",
"selected",
"shape",
"size",
"sizes",
"sortable",
"span",
"spellCheck",
"src",
"srcDoc",
"srcSet",
"start",
"step",
"style",
"tabIndex",
"target",
"title",
"translate",
"type",
"typeMustMatch",
"useMap",
"value",
"width",
"wmode",
"wrap",
"onCopy",
"onCut",
"onPaste",
"onLoad",
"onError",
"onWheel",
"onScroll",
"onCompositionEnd",
"onCompositionStart",
"onCompositionUpdate",
"onKeyDown",
"onKeyPress",
"onKeyUp",
"onFocus",
"onBlur",
"onChange",
"onInput",
"onSubmit",
"onClick",
"onContextMenu",
"onDoubleClick",
"onDrag",
"onDragEnd",
"onDragEnter",
"onDragExit",
"onDragLeave",
"onDragOver",
"onDragStart",
"onDrop",
"onMouseDown",
"onMouseEnter",
"onMouseLeave",
"onMouseMove",
"onMouseOut",
"onMouseOver",
"onMouseUp",
"onSelect",
"onTouchCancel",
"onTouchEnd",
"onTouchMove",
"onTouchStart",
"onAnimationStart",
"onAnimationEnd",
"onAnimationIteration",
"onTransitionEnd"
];

export default function filterReactDomProps(props) {
const filterProps = {};

for (const prop in props) {
if (props.hasOwnProperty(prop) && DOMProps[prop]) {
if (props.hasOwnProperty(prop) && DOMProps.indexOf(prop) !== -1) {
filterProps[prop] = props[prop];
}
}
Expand Down