From 1df99269ed4f25d4e70389ba70337ca62a545a5c Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Tue, 20 May 2014 23:49:15 -0700 Subject: [PATCH] Use bind --- nt3d.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nt3d.js b/nt3d.js index bc11c71..d4e62f6 100644 --- a/nt3d.js +++ b/nt3d.js @@ -418,7 +418,7 @@ nt3d = { // Continue in a callback, so that there's not a stale download // link hanging around while we process. - setTimeout(function(the_this) { (function() { + setTimeout(function() { // Get params from form var params = []; @@ -446,7 +446,7 @@ nt3d = { this.ui.appendChild(download_link); setTimeout(function() { download_link.setAttribute("style", "-webkit-transition: background-color 0.4s; -moz-transition: background-color 0.4s; -o-transition: background-color 0.4s; -ms-transition: background-color 0.4s; transition: background-color 0.4s; background-color: inherit"); }, 0); - }).call(the_this); }, 0, this); // (We were in a callback this whole time, remember?) + }.bind(this), 0); // (We were in a callback this whole time, remember?) }, framework: function (f, params) { this.user_function = f; -- 2.44.1