Class DocumentTriggerBuilder

DocumentTriggerBuilder

A builder for document triggers.

Methods

MethodReturn typeBrief description
create()TriggerCreates and returns the new trigger.
onOpen()DocumentTriggerBuilderSpecifies a trigger that will fire when the document is opened.

Detailed documentation

create()

Creates and returns the new trigger.

Return

Trigger — the new trigger

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.googleapis.com/auth/script.scriptapp

onOpen()

Specifies a trigger that will fire when the document is opened.

var document = DocumentApp.getActiveDocument();
ScriptApp.newTrigger('myFunction')
  .forDocument(document)
  .onOpen()
  .create();

Return

DocumentTriggerBuilder — this DocumentTriggerBuilder, for chaining

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.googleapis.com/auth/script.scriptapp

フィードバックを送信...

ご不明な点がありましたら、Google のサポートページをご覧ください。