Path: blob/trunk/third_party/closure/goog/events/eventid.js
4575 views
/**1* @license2* Copyright The Closure Library Authors.3* SPDX-License-Identifier: Apache-2.04*/56goog.provide('goog.events.EventId');78910/**11* A templated class that is used when registering for events. Typical usage:12*13* /** @type {goog.events.EventId<MyEventObj>} *\14* var myEventId = new goog.events.EventId(15* goog.events.getUniqueId(('someEvent'));16*17* // No need to cast or declare here since the compiler knows the18* // correct type of 'evt' (MyEventObj).19* something.listen(myEventId, function(evt) {});20*21* @param {string} eventId22* @template T23* @constructor24* @struct25* @final26*/27goog.events.EventId = function(eventId) {28'use strict';29/** @const */ this.id = eventId;30};313233/**34* @override35* @return {string}36*/37goog.events.EventId.prototype.toString = function() {38'use strict';39return this.id;40};414243