We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7152bc commit e620a8aCopy full SHA for e620a8a
对Event事件进行兼容性处理
@@ -1,10 +1,11 @@
1
var EventUtil = {
2
- getTarget:function (event) {
+ getTarget:function (event) {
3
return event.target || event.srcElement
4
},
5
- preventDefault:function (event) {
+ preventDefault:function (event) {
6
event.preventDefault?event.preventDefault():event.returnValue = false;
7
8
stopPropagation:function (event) {
9
event.stopPropagation?event.stopPropagation():event.cancelBubble = true;
10
}
11
+ }
0 commit comments