Path: blob/trunk/third_party/closure/goog/history/event.js
2868 views
// Copyright 2010 The Closure Library Authors. All Rights Reserved.1//2// Licensed under the Apache License, Version 2.0 (the "License");3// you may not use this file except in compliance with the License.4// You may obtain a copy of the License at5//6// http://www.apache.org/licenses/LICENSE-2.07//8// Unless required by applicable law or agreed to in writing, software9// distributed under the License is distributed on an "AS-IS" BASIS,10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11// See the License for the specific language governing permissions and12// limitations under the License.1314/**15* @fileoverview The event object dispatched when the history changes.16*17*/181920goog.provide('goog.history.Event');2122goog.require('goog.events.Event');23goog.require('goog.history.EventType');24252627/**28* Event object dispatched after the history state has changed.29* @param {string} token The string identifying the new history state.30* @param {boolean} isNavigation True if the event was triggered by a browser31* action, such as forward or back, clicking on a link, editing the URL, or32* calling {@code window.history.(go|back|forward)}.33* False if the token has been changed by a {@code setToken} or34* {@code replaceToken} call.35* @constructor36* @extends {goog.events.Event}37* @final38*/39goog.history.Event = function(token, isNavigation) {40goog.events.Event.call(this, goog.history.EventType.NAVIGATE);4142/**43* The current history state.44* @type {string}45*/46this.token = token;4748/**49* Whether the event was triggered by browser navigation.50* @type {boolean}51*/52this.isNavigation = isNavigation;53};54goog.inherits(goog.history.Event, goog.events.Event);555657