123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- goog.provide('goog.events.Event');
- goog.provide('goog.events.EventLike');
- goog.require('goog.Disposable');
- goog.require('goog.events.EventId');
- goog.events.EventLike;
- goog.events.Event = function(type, opt_target) {
-
- this.type = type instanceof goog.events.EventId ? String(type) : type;
-
- this.target = opt_target;
-
- this.currentTarget = this.target;
-
- this.propagationStopped_ = false;
-
- this.defaultPrevented = false;
-
- this.returnValue_ = true;
- };
- goog.events.Event.prototype.stopPropagation = function() {
- this.propagationStopped_ = true;
- };
- goog.events.Event.prototype.preventDefault = function() {
- this.defaultPrevented = true;
- this.returnValue_ = false;
- };
- goog.events.Event.stopPropagation = function(e) {
- e.stopPropagation();
- };
- goog.events.Event.preventDefault = function(e) {
- e.preventDefault();
- };
|