Skip to content

HTMLDOMPropertyConfig contains non-standard icon property #7430

@smockle

Description

@smockle

Do you want to request a feature or report a bug?
Report a bug.

What is the current behavior?
The HTMLDOMPropertyConfig object includes an icon property in a section title Standard Properties, but icon isn’t an attribute supported by any standard HTML element.

icon is not included in the HTML4 or HTML5 specs:
List of HTML4 attributes
List of HTML5 attributes

Mozilla Developer Network includes icon in its list of attributes, but specifies the only element to use icon is the obsolete <command> element. <command> isn’t supported in any desktop or mobile browser.

What is the expected behavior?
The icon property might be better placed in the section titled Non-standard Properties, or removed altogether. The documentation for HTML attributes could omit icon too.

I encountered this issue when working with TypeScript, and I opened an issue about the React type definition at DefinitelyTyped/DefinitelyTyped#10467. Because React itself includes icon, custom interfaces which extend DefinitelyTyped’s React.HTMLAttributes cannot include a non-string icon property.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
icon was added in a React 0.4.0 alpha in 2013: 203dba2. The commit message mentions mostly this was to better support some HTML5 stuff—it’s possible icon was part of a draft of the HTML5 standard at the time, but was omitted in the final spec.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions