Enum TabType

Tab類型

所有分頁類型的列舉。

如要呼叫列舉,請呼叫其父項類別、名稱和屬性。例如 DocumentApp.TabType.TAB

使用 TabType 列舉來檢查特定元素的類型,例如:

const tab = DocumentApp.getActiveDocument().getActiveTab();
// Use getType() to determine the tab's type before casting.
if (tab.getType() === DocumentApp.TabType.DOCUMENT_TAB) {
  // It's a document tab, write some text to it.
  tab.asDocumentTab().setText('Hello World!');
} else {
  // There are currently no types other than DOCUMENT_TAB.
}

屬性

屬性類型說明
DOCUMENT_TABEnum對應至 DocumentTab 的類型。