rem:  var deleteLink = document.createElement("span"); newItem.appendChild(deleteLink); deleteLink.className = "query-delete"; Event.observe(deleteLink, "click", function() { if (confirm("Are you sure you want to delete this query?")) { this.remove(key); } }.bindAsEventListener(this) ); deleteLink.title = "Click to delete this query from your history."; deleteLink.appendChild(document.createTextNode(" (x) "));  
context:     this.newListItem = function(key, query) {        var newItem = document.createElement("li");        var queryNode = document.createElement("span");        queryNode.appendChild(document.createTextNode(query));        // onclick, copy to current textarea        Event.observe(queryNode, "click",                      this.setQuery.bindAsEventListener(this));        // tool-tip        queryNode.title = "Click to copy this into the active buffer.";        newItem.appendChild(queryNode);        // delete widget        var deleteLink = document.createElement("span");        newItem.appendChild(deleteLink);        deleteLink.className = "query-delete";        Event.observe(deleteLink, "click",                      function() {            if (confirm("Are you sure you want to delete this query?")) {                this.remove(key);            }        }.bindAsEventListener(this)                      );        deleteLink.title = "Click to delete this query from your history.";        deleteLink.appendChild(document.createTextNode(" (x) "));        // spacing: css padding, margin don't seem to work with ol        newItem.appendChild(document.createElement("hr"));        return newItem;    }
meta: 952	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/d247a1b6dacb7417d1b16dd5d23f8786e47c143b/query.js/buggy/query.js