For example, the web page under test has a function 'xyz' defined in the <script> tag.
If for example you have an html like this :
Then In TruClient on IE and Firefox you should be able to execute foo in an “Evaluate JavaScrpt Code” step using this simple statement in the "Code" argument – “window.foo()”
In chromium, I am sorry to say it is currently impossible to do because of restrictions that chromium imposes on accessing the application code from the extension and vice versa .
Hope this helps