スプレッドシートの編集時に実行される Google Script を作成しました。
function onEdit(event)
{
Browser.msgBox(event.source);
general(event);
}
関数の名前が onEdit() の場合、Browser.msgBox は "Spreadsheet" を返します (したがって、ソースが定義されます) 関数の名前が othername() の場合、Browser.msgBox は "undefined" を返します。
同じユーザーでスクリプトを実行します。スプレッドシートを編集するとスクリプトが実行され、関数の名前以外は何も変更しません。
ありがとう。