sku-pg
Version:
Skulpt is a Javascript implementation of Python 2.x. Python that runs in your browser!
37 lines (33 loc) • 1.02 kB
HTML
<html>
<!--
Copyright 2010 The Closure Library Authors. All Rights Reserved.
Use of this source code is governed by an Apache 2.0 License.
See the COPYING file for details.
-->
<head>
<title>History Demo JavaScript Page</title>
</head>
<body>
<script type="text/javascript" src="../base.js"></script>
<script type="text/javascript">
goog.require('goog.dom');
goog.require('goog.events');
goog.require('goog.History');
</script>
<script type="text/javascript">
var googHist = new goog.History(
false, 'history_blank.html', top.document.getElementById('hist_state'));
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>