I am creating a plugin using jQuery library.
Here i am storing String.prototype in a variable then i am using this variable to extend my Sting objec
Use the bind() method for "assigning" the native JS method to a variable:
var ce = document.createElement.bind(document); var elem = ce('div'); alert(elem.nodeName);
Works in modern browsers including IE9+. For older browsers, use a wrapper function.