Skip to content

Commit

Permalink
Add pages for HTML{FieldSet,Output}Element.type (#35666)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena authored Sep 10, 2024
1 parent 650feba commit 9f7016d
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 13 deletions.
35 changes: 35 additions & 0 deletions files/en-us/web/api/htmlfieldsetelement/type/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: "HTMLFieldSetElement: type property"
short-title: type
slug: Web/API/HTMLFieldSetElement/type
page-type: web-api-instance-property
browser-compat: api.HTMLFieldSetElement.type
---

{{ApiRef("HTML DOM")}}

The **`type`** read-only property of the {{domxref("HTMLFieldSetElement")}} interface returns the string `"fieldset"`.

## Value

The string `"fieldset"`.

## Example

```js
const fs = document.querySelector("fieldset");
console.log(fs.type); // "fieldset"
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("HTMLFieldSetElement")}}
- {{HTMLElement("fieldset")}}
35 changes: 35 additions & 0 deletions files/en-us/web/api/htmloutputelement/type/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: "HTMLOutputElement: type property"
short-title: type
slug: Web/API/HTMLOutputElement/type
page-type: web-api-instance-property
browser-compat: api.HTMLOutputElement.type
---

{{ApiRef("HTML DOM")}}

The **`type`** read-only property of the {{domxref("HTMLOutputElement")}} interface returns the string `"output"`.

## Value

The string `"output"`.

## Example

```js
const output = document.querySelector("output");
console.log(output.type); // "output"
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("HTMLOutputElement")}}
- {{HTMLElement("output")}}
19 changes: 6 additions & 13 deletions files/en-us/web/api/htmltextareaelement/type/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,17 @@ browser-compat: api.HTMLTextAreaElement.type

{{ApiRef("HTML DOM")}}

The read-only **`type`** property of the {{domxref("HTMLTextAreaElement")}} always returns `textarea`.
The **`type`** read-only property of the {{domxref("HTMLTextAreaElement")}} interface returns the string `"textarea"`.

## Value

A string whose value is always `textarea`.
The string `"textarea"`.

## Example

### HTML

```html
<textarea id="txtarea"></textarea>
```

### JavaScript

```js
const txtAreaElement = document.querySelector("#txtarea");
console.log(txtAreaElement.type); // Output: "textarea"
const textArea = document.querySelector("textarea");
console.log(textArea.type); // "textarea"
```

## Specifications
Expand All @@ -39,4 +31,5 @@ console.log(txtAreaElement.type); // Output: "textarea"

## See also

- {{domxref("HTMLInputElement.type")}} property
- {{domxref("HTMLTextAreaElement")}}
- {{HTMLElement("textarea")}}

0 comments on commit 9f7016d

Please sign in to comment.