Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add document for HTMLInputElement.type #32021

Merged
merged 4 commits into from
Jan 31, 2024

Conversation

ShubhamOulkar
Copy link
Contributor

@ShubhamOulkar ShubhamOulkar commented Jan 31, 2024

This PR add documentation for HTMLInputElement.type property.

It is part of mdn/mdn#520

Resource
type

@ShubhamOulkar ShubhamOulkar requested a review from a team as a code owner January 31, 2024 01:53
@ShubhamOulkar ShubhamOulkar requested review from wbamberg and removed request for a team January 31, 2024 01:53
@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Jan 31, 2024
Copy link
Contributor

github-actions bot commented Jan 31, 2024

Preview URLs

Flaws (2)

URL: /en-US/docs/Web/API/HTMLInputElement/type
Title: HTMLInputElement: type property
Flaw count: 2

  • macros:
    • /en-US/docs/Web/API/HTMLTextAreaElement/type does not exist
    • /en-US/docs/Web/API/HTMLButtonElement/type does not exist

(comment last updated: 2024-01-31 14:28:23)

@ShubhamOulkar ShubhamOulkar changed the title document for HTMLInputElement.type add document for HTMLInputElement.type Jan 31, 2024

{{ApiRef("HTML DOM")}}

The **`type`** property of the {{domxref("HTMLInputElement")}} interface is a string that indicates behaviour and rendering type of the {{HTMLElement("input")}} element.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The **`type`** property of the {{domxref("HTMLInputElement")}} interface is a string that indicates behaviour and rendering type of the {{HTMLElement("input")}} element.
The **`type`** property of the {{domxref("HTMLInputElement")}} interface is a string that indicates the behavior and type of the {{HTMLElement("input")}} element, that is, if it is an input for text, a number, a date…

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The **`type`** property of the {{domxref("HTMLInputElement")}} interface is a string that indicates behaviour and rendering type of the {{HTMLElement("input")}} element.
The **`type`** property of the {{domxref("HTMLInputElement")}} interface is a string that indicates behaviour type of the {{HTMLElement("input")}} element, that is, if it is an input for text, a number, a date, etc.


## Value

A string representing type values. Default value is a `text`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value is for the attribute, not for the property.

Suggested change
A string representing type values. Default value is a `text`.
A string representing the type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote this because some properties written with default values.

But you are right, defaults are for attributes.


A string representing type values. Default value is a `text`.

It's possible values are listed in [input types](/en-US/docs/Web/HTML/Element/input#input_types).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It's possible values are listed in [input types](/en-US/docs/Web/HTML/Element/input#input_types).
Its possible values are listed in the attribute's [input types](/en-US/docs/Web/HTML/Element/input#input_types) section.


## See also

- {{domxref("HTMLTextAreaElement.type")}} property that returns the string "textarea".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- {{domxref("HTMLTextAreaElement.type")}} property that returns the string "textarea".
- {{domxref("HTMLTextAreaElement.type")}} property

Copy link
Contributor Author

@ShubhamOulkar ShubhamOulkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small rephrasing


{{ApiRef("HTML DOM")}}

The **`type`** property of the {{domxref("HTMLInputElement")}} interface is a string that indicates behaviour and rendering type of the {{HTMLElement("input")}} element.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The **`type`** property of the {{domxref("HTMLInputElement")}} interface is a string that indicates behaviour and rendering type of the {{HTMLElement("input")}} element.
The **`type`** property of the {{domxref("HTMLInputElement")}} interface is a string that indicates behaviour type of the {{HTMLElement("input")}} element, that is, if it is an input for text, a number, a date, etc.


## Value

A string representing type values. Default value is a `text`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote this because some properties written with default values.

But you are right, defaults are for attributes.

Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>
Copy link
Contributor

@teoli2003 teoli2003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@teoli2003 teoli2003 merged commit b716718 into mdn:main Jan 31, 2024
8 checks passed
@ShubhamOulkar ShubhamOulkar deleted the HTMLInputElement.type branch January 31, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants