mirror of
https://github.com/golang/go
synced 2024-11-18 10:24: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:
parent
6c3528d5c1
commit
527b253f58
@ -538,7 +538,7 @@ function setupNotesSync() {
|
||||
|
||||
function setupPlayResizeSync() {
|
||||
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) {
|
||||
if ($(event.target).hasClass('ui-resizable')) {
|
||||
localStorage.setItem('play-index', i);
|
||||
@ -549,7 +549,7 @@ function setupNotesSync() {
|
||||
};
|
||||
function setupPlayCodeSync() {
|
||||
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);
|
||||
|
||||
function inputHandler(e) {
|
||||
|
Loading…
Reference in New Issue
Block a user