ElementType

An enumeration of all the element types.

To call an enum, you call its parent class, name, and property. For example, `
DocumentApp.ElementType.BODY_SECTION`.

Use the `https://developers.google.com/apps-script/reference/document/element-type#` enumeration to check the type of a given element, for instance:

```javascript
const documentTab =
    DocumentApp.getActiveDocument().getActiveTab().asDocumentTab();
const firstChild = documentTab.getBody().getChild(0);
if (firstChild.getType() === DocumentApp.ElementType.PARAGRAPH) {
  // It's a paragraph, apply a paragraph heading.
  firstChild.asParagraph().setHeading(DocumentApp.ParagraphHeading.HEADING1);
}
```

### Properties

| Property | Type | Description |
|---|---|---|
| `BODY_SECTION` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/body` element. |
| `COMMENT_SECTION` | `Enum` | The type corresponding to the `CommentSection` element. |
| `DATE` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/date` element. |
| `EQUATION` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/equation` element. |
| `EQUATION_FUNCTION` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/equation-function` element. |
| `EQUATION_FUNCTION_ARGUMENT_SEPARATOR` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/equation-function-argument-separator` element. |
| `EQUATION_SYMBOL` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/equation-symbol` element. |
| `RICH_LINK` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/rich-link` element. |
| `FOOTER_SECTION` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/footer-section` element. |
| `FOOTNOTE` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/footnote` element. |
| `FOOTNOTE_SECTION` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/footnote-section` element. |
| `HEADER_SECTION` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/header-section` element. |
| `HORIZONTAL_RULE` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/horizontal-rule` element. |
| `INLINE_DRAWING` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/inline-drawing` element. |
| `INLINE_IMAGE` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/inline-image` element. |
| `LIST_ITEM` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/list-item` element. |
| `PAGE_BREAK` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/page-break` element. |
| `PARAGRAPH` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/paragraph` element. |
| `PERSON` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/person` element. |
| `TABLE` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/table` element. |
| `TABLE_CELL` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/table-cell` element. |
| `TABLE_OF_CONTENTS` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/table-of-contents` element. |
| `TABLE_ROW` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/table-row` element. |
| `TEXT` | `Enum` | The type corresponding to the `https://developers.google.com/apps-script/reference/document/text` element. |
| `UNSUPPORTED` | `Enum` | The type corresponding to `https://developers.google.com/apps-script/reference/document/unsupported-element`. Unsupported elements represent document portions that do not support scripting. |