add: } else if ("getSelectedCalendarOrNull" in window) {  todo.calendar = getSelectedCalendarOrNull(); 
context: function createTodoWithDialog(calendar, dueDate, summary, todo){    const kDefaultTimezone = calendarDefaultTimezone();    var onNewItem = function(item, calendar, originalItem) {        doTransaction('add', item, calendar, null, null);    }    if (todo) {        openEventDialog(todo, calendar, "new", onNewItem);        return;    }    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);    }    setDefaultAlarmValues(todo);    openEventDialog(todo, calendar, "new", onNewItem);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/84a71c8ce9b24dd035aeb7219b1fa09a030b04b5/calendar-item-editing.js/clean/calendar/base/content/calendar-item-editing.js