Execute JavaScript at beginning of Application

What I meant was that I have two classes extending BaseApplication.
One should call the JavaScript, the other should not.

Thanks,
Roland