I\'ve got a weird question in that I need to inject some javascript into another javascript function. I am using a framework which is locked so I can not change the existing fun
I can not change the doSomething function... Instead I need to somehow inject a few lines of code into the end of the doSomething code
Injecting a few lines into the end of the doSomething
code sounds like changing the doSomething
function, to me. I think, unfortunately, that you’re screwed.
(I’m a bit hazy on all this, but I think functions are how people who worry about such things implement information hiding in JavaScript, precisely because you can’t access their scope from outside them.)