removing anchor spec and improving jqLite.trigger() method

- removing the last anchor spec because it can't run reliably in all browsers
- improving jqLite.trigger() method
This commit is contained in:
Igor Minar
2010-10-04 23:42:21 -07:00
committed by Misko Hevery
parent 8e40e7070d
commit a930e782a5
2 changed files with 4 additions and 26 deletions

View File

@@ -119,9 +119,10 @@ JQLite.prototype = {
},
trigger: function(type) {
var evnt = document.createEvent('MouseEvent');
evnt.initMouseEvent(type, true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, _null);
this[0].dispatchEvent(evnt);
var evnt = document.createEvent('MouseEvents'),
element = this[0];
evnt.initMouseEvent(type, true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, element);
element.dispatchEvent(evnt);
},
replaceWith: function(replaceNode) {