Skip to content

Commit e620a8a

Browse files
authored
Update 对Event事件进行兼容性处理
1 parent c7152bc commit e620a8a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

对Event事件进行兼容性处理

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
var EventUtil = {
2-
getTarget:function (event) {
2+
getTarget:function (event) {
33
return event.target || event.srcElement
44
},
5-
preventDefault:function (event) {
5+
preventDefault:function (event) {
66
event.preventDefault?event.preventDefault():event.returnValue = false;
77
},
88
stopPropagation:function (event) {
99
event.stopPropagation?event.stopPropagation():event.cancelBubble = true;
1010
}
11+
}

0 commit comments

Comments
 (0)