diff options
Diffstat (limited to 'contexts/data/lib/closure-library/closure/goog/demos/history3js.html')
-rw-r--r-- | contexts/data/lib/closure-library/closure/goog/demos/history3js.html | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/contexts/data/lib/closure-library/closure/goog/demos/history3js.html b/contexts/data/lib/closure-library/closure/goog/demos/history3js.html deleted file mode 100644 index a575a04..0000000 --- a/contexts/data/lib/closure-library/closure/goog/demos/history3js.html +++ /dev/null @@ -1,48 +0,0 @@ -<!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.debug.Logger'); -goog.require('goog.dom'); -goog.require('goog.events'); -goog.require('goog.history.EventType'); -</script> -<script> -var logger = goog.debug.Logger.getLogger('demo'); -var logconsole = new goog.debug.DivConsole(top.document.getElementById('log')); -logconsole.setCapturing(true); - -var events = goog.object.getValues(goog.history.EventType); -logger.info('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) { - logger.info(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> |