Skip to content

Commit

Permalink
x/tools/cmd/present: Fix present not working on Safari
Browse files Browse the repository at this point in the history
As described on golang/go#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>
  • Loading branch information
glorieux authored and adg committed Jul 3, 2016
1 parent 6c3528d commit 527b253
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/present/static/slides.js
Expand Up @@ -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);
Expand All @@ -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) {
Expand Down

0 comments on commit 527b253

Please sign in to comment.