Sha256: fefd2a84fa3b77db4155c7646b0283c4299c76d9a3c6ce5e588184d425a16a7e
Contents?: true
Size: 1.42 KB
Versions: 1
Compression:
Stored size: 1.42 KB
Contents
<!DOCTYPE html> <html> <!-- Copyright 2010 The Closure Library Authors. All Rights Reserved. Use of this source code is governed by the Apache License, Version 2.0. See the COPYING file for details. --> <head> <title>History Demo JavaScript Page</title> </head> <body> <script src="../base.js"></script> <script> goog.require('goog.History'); goog.require('goog.debug.DivConsole'); goog.require('goog.dom'); goog.require('goog.events'); goog.require('goog.history.EventType'); goog.require('goog.log'); </script> <script> var logger = goog.log.getLogger('demo'); var logconsole = new goog.debug.DivConsole(top.document.getElementById('log')); logconsole.setCapturing(true); var events = goog.object.getValues(goog.history.EventType); goog.log.info(logger, 'Listening for: ' + events.join(', ') + '.'); var googHist = new goog.History( false, 'history_blank.html', top.document.getElementById('hist_state')); goog.events.listen(googHist, events, function(e) { goog.log.info(logger, goog.string.subs('dispatched: %s (token="%s", isNavigation=%s)', e.type, e.token, e.isNavigation)); }); goog.events.listen(googHist, goog.History.EventType.NAVIGATE, navCallback); googHist.setEnabled(true); function navCallback(e) { var output = top.document.getElementById('token_output'); if (output) { var token = (e.token == null) ? 'null' : '\u201C' + e.token + '\u201D'; goog.dom.setTextContent(output, token); } } </script> </body> </html>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
k4compiler-0.0.1 | third_party/closure-library/closure/goog/demos/history3js.html |