当我像这样绑定事件时:
Selector.prototype.setupEventHandlers = function() {
var cssSelector = '*:not(.' + this.ignoreClass + ')';
jQuery(cssSelector).bind("mousedown", { 'self': this }, this.onSelectorMousedown);
};
并使 EventHandler 像这样:
Selector.prototype.onSelectorMousedown = function(e) {
self = this;
...
}
我总是有 self = HTMLParagraphElement 而不是真正被点击的元素。