Test case details

Preparation Code

<script src="https://ajax.googleapis.com/ajax/libs/dojo/1/dojo/dojo.xd.js"> </script> <script>   function foo() {} </script>
var binder = function(scope, method) {       return function() {          return method.apply(scope, arguments);       }     };

Test cases

Test #1

var test = (function() {   return this }.bind(this)); test();

Test #2

var self = this; var test = function() {     return self     }; test();

Test #3

var test = dojo.hitch(this, function() {   return this }); test();

Test #4

var test = binder(this, function() {   return this }); test();

Test #5

var test = function() {   return this }; test.call(this);