]> git.scottworley.com Git - nt3d/commitdiff
Use bind
authorScott Worley <scottworley@scottworley.com>
Wed, 21 May 2014 06:49:15 +0000 (23:49 -0700)
committerScott Worley <scottworley@scottworley.com>
Wed, 21 May 2014 06:49:15 +0000 (23:49 -0700)
nt3d.js

diff --git a/nt3d.js b/nt3d.js
index bc11c71520157e9b708ace929d7c7ce71d5bcc6d..d4e62f6d20f5a89c04939cf9465ef6637708cb8a 100644 (file)
--- 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;