JavaScript calling a getter from its function -
is trying to do something that looks like pseudo-code will look like this:
< Pre> (function (scope) {scope.doSomenthin = function () {if (x === y & amp; this.onfinish) {// if present, run onfinish; Should return. ();}}}) (Scope); Window.scope = window.scope || (Window.scope = {}); Scope.doSomenthin () Onfinish = function () {return 'fin'}
At run time if onfinish
is present, try to run that function using gates / setter But at that time it will return the undefined. Works from time to time, but nothing has to do with it.
Any other ideas? Thank you.
I'm not sure if I fully understand the question, but I guess what you do Do you want to set a context for the tasks you have called below, what are you doing after you?
// Create an object that accesses the properties of an object and with 'this' var doSomethin = function () {var result = "nonfinish"; If (this.onfinish) {// If present, run onfinish, then 'fin' result = this.onfinish () should return; } Return results; } // Add an 'onfinish' method for the 'scope' object scope = {onfinish: function} () {return 'fin'}} // Run the accelerator function in the window context alert (doSomethin ()); // run the accelerator function (doSomethin.call (scope)) in Scope's Reference Warning;
Comments
Post a Comment