This was copied from jQuery 1.x, where it existed to reduce
memory usage in IE6-8. This was because it's JS engine was not
able to break the circular closure reference (the function
invocation has a reference to the script element, the script
element has an event listener with closure access to the script
element). This bug is no longer relevant.
Change-Id: I6fd66c5fbf3afb3c9e09bba6322dc3fac2fad4a6
if ( script.parentNode ) {
script.parentNode.removeChild( script );
}
- script = null;
if ( callback ) {
callback();
callback = null;