![]() |
| ||
| restore default (built-in) function after overriding Hi all. I need to know how to restore or roll back to built-in function after overriding like following example. String.prototype.substr= function() { return "";} Now I want to use the one already built-in. I shall be very thankful if some one could help me. Sultan Wadood |
| ||
| call built-in from overridden function of Object in javascript Hi All. Do any body know how to call built in function of object like substr from overridden version. I am trying following example but the function called itself recursively not the function being overridden. String.prototype.substr= function(str) { return str.substr(0,5); } I shall be very thankful if some one could give me some hints. Sultan Wadood. |
| ||
| Re: restore default (built-in) function after overriding I don't think its possible to revert to the old function unless you save it somewhere. eg: String.prototype._substr = String.prototype.substr; |
| ||
| Re: restore default (built-in) function after overriding my all poste problems have been solved. thanks for helping and your valuable time. Sultan Wadood. |
| All times are GMT -4. The time now is 4:33 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC