Énumération de tous les types d'éléments.
Pour appeler un énumération, vous devez appeler sa classe parente, son nom et sa propriété. Par exemple, 
DocumentApp.ElementType.BODY_SECTION.
Utilisez l'énumération Element pour vérifier le type d'un élément donné, par exemple:
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); }
Propriétés
| Propriété | Type | Description | 
|---|---|---|
| BODY_SECTION | Enum | Type correspondant à l'élément Body. | 
| COMMENT_SECTION | Enum | Type correspondant à l'élément . | 
| DATE | Enum | Type correspondant à l'élément Date. | 
| EQUATION | Enum | Type correspondant à l'élément Equation. | 
| EQUATION_FUNCTION | Enum | Type correspondant à l'élément Equation. | 
| EQUATION_FUNCTION_ARGUMENT_SEPARATOR | Enum | Type correspondant à l'élément Equation. | 
| EQUATION_SYMBOL | Enum | Type correspondant à l'élément Equation. | 
| RICH_LINK | Enum | Type correspondant à l'élément Rich. | 
| FOOTER_SECTION | Enum | Type correspondant à l'élément Footer. | 
| FOOTNOTE | Enum | Type correspondant à l'élément Footnote. | 
| FOOTNOTE_SECTION | Enum | Type correspondant à l'élément Footnote. | 
| HEADER_SECTION | Enum | Type correspondant à l'élément Header. | 
| HORIZONTAL_RULE | Enum | Type correspondant à l'élément Horizontal. | 
| INLINE_DRAWING | Enum | Type correspondant à l'élément Inline. | 
| INLINE_IMAGE | Enum | Type correspondant à l'élément Inline. | 
| LIST_ITEM | Enum | Type correspondant à l'élément List. | 
| PAGE_BREAK | Enum | Type correspondant à l'élément Page. | 
| PARAGRAPH | Enum | Type correspondant à l'élément Paragraph. | 
| PERSON | Enum | Type correspondant à l'élément Person. | 
| TABLE | Enum | Type correspondant à l'élément Table. | 
| TABLE_CELL | Enum | Type correspondant à l'élément Table. | 
| TABLE_OF_CONTENTS | Enum | Type correspondant à l'élément Table. | 
| TABLE_ROW | Enum | Type correspondant à l'élément Table. | 
| TEXT | Enum | Type correspondant à l'élément Text. | 
| UNSUPPORTED | Enum | Type correspondant à Unsupported. Les éléments non compatibles représentent des parties de document qui ne sont pas compatibles avec l'écriture de script. |