rem: var todo = createToDo(); 
add:  var onNewItem = function(item, calendar, originalItem) { calendar.addItem(item, null); }  if (todo) { openEventDialog(todo, calendar, "new", onNewItem); return; }  todo = createToDo(); 
context: function createTodoWithDialog(calendar, dueDate, summary){    const kDefaultTimezone = calendarDefaultTimezone();    var todo = createToDo();    if (calendar) {        todo.calendar = calendar;    }    if (summary)        todo.title = summary;    if (dueDate)        todo.dueDate = dueDate;    var onNewItem = function(item, calendar, originalItem) {        calendar.addItem(item, null);    }    openEventDialog(todo, calendar, "new", onNewItem);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/edb75cb3aa7fe2a0098e7d7a97a91ce5dd7f6556/calendar-item-editing.js/clean/calendar/base/content/calendar-item-editing.js