1
0
mirror of https://github.com/golang/go synced 2024-11-18 12:14:42 -07:00

x/tools/cmd/present: Fix present not working on Safari

As described on https://github.com/golang/go/issues/16216 present is not
currently working on Safari because of the use of ES6 JavaScript let
statements.
The solution is to use var statements instead of let.

Fixes golang/go#16216

Change-Id: I44c84f920aa41dfc8de5997ab50a440de6d57093
Reviewed-on: https://go-review.googlesource.com/24721
Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
glorieux 2016-07-02 14:52:24 +02:00 committed by Andrew Gerrand
parent 6c3528d5c1
commit 527b253f58

View File

@ -538,7 +538,7 @@ function setupNotesSync() {
function setupPlayResizeSync() { function setupPlayResizeSync() {
var out = document.getElementsByClassName('output'); var out = document.getElementsByClassName('output');
for (let i = 0; i < out.length; i++) { for (var i = 0; i < out.length; i++) {
$(out[i]).bind('resize', function(event) { $(out[i]).bind('resize', function(event) {
if ($(event.target).hasClass('ui-resizable')) { if ($(event.target).hasClass('ui-resizable')) {
localStorage.setItem('play-index', i); localStorage.setItem('play-index', i);
@ -549,7 +549,7 @@ function setupNotesSync() {
}; };
function setupPlayCodeSync() { function setupPlayCodeSync() {
var play = document.querySelectorAll('div.playground'); var play = document.querySelectorAll('div.playground');
for (let i = 0; i < play.length; i++) { for (var i = 0; i < play.length; i++) {
play[i].addEventListener('input', inputHandler, false); play[i].addEventListener('input', inputHandler, false);
function inputHandler(e) { function inputHandler(e) {