rem: toolkitCore.CloseWindow(window); 
add: window.close(); 
context: function initDialog() {  // Get a single selected anchor element  anchorElement = appCore.getSelectedElement(tagName);  selection = appCore.editorSelection;  if (selection) {    dump("There is a selection: collapsed = "+selection.isCollapsed+"\n");  } else {    dump("Failed to get selection\n");  }  if (anchorElement) {    // We found an element and don't need to insert one    insertNew = false;  } else {    // We don't have an element selected,     //  so create one with default attributes    dump("Element not selected - calling createElementWithDefaults\n");    anchorElement = appCore.createElementWithDefaults(tagName);    // We will insert a new link at caret location if there's no selection    // TODO: This isn't entirely correct. If selection doesn't have any text    //   or an image, then shouldn't we clear the selection and insert new text?    insertNew = selection.isCollapsed;  }  if(!anchorElement)  {    dump("Failed to get selected element or create a new one!\n");    toolkitCore.CloseWindow(window);  } else if (!insertNew) {      dump("Need to get selected text\n");    // Replace the link message with the link source string    // TODO: Get the text of the selection WHAT ABOUT IMAGES?    //  Maybe have a special method "GetLinkSource" that resolves images as    //   their URL? E.g.: "Link source [image:http://myimage.gif]"    dialog.linkMessage.data = "[Link source text or image URL goes here]";  }  if (!selection.isCollapsed)  {    // HREF is a weird case: If selection extends beyond    //   the link, user probably wants to extend link to     //   entire selection.    // TODO: If there was already a link,     //   we need to know if selection extends beyond existing    //   link text before we should do this    insertLinkAroundSelection = true;    dump("insertLinkAroundSelection is TRUE\n");  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/a152976669b5eefdf918a3c66ac8ee8458d41637/EdLinkProps.js/buggy/editor/ui/dialogs/content/EdLinkProps.js