1. A method for performing server-side translation for supporting custom applications in client-side scripts comprising: retrieving a client-side script, for execution in a client-environment; detecting an incompatibility of the retrieved client-side script with the client-environment, resulting from a dependency of the client-side script upon an expected occurrence of an event in the client-environment; and, rewriting the retrieved client-side script to manually invoke the expected event in the client-environment.