Loading JS dynamically

Is it possible to load JS dynamically?

What I want to do is to enable automatic JS code update on client side whenever JS code is changed on the server side.

For example if I have House.js file which describes custom House component.
What I want is to send periodically request to the server asking if JS file was changed and if so, reload it and re-create House component so new version of it can be used from now on.

This will simplify new components development process when developer wants to try minor changes and web-session restart is required.

Thank you,
Volodymyr

Hi Volodymyr,

The evalResult property of the RPCRequest gives you an easy way to load new classes.

If there is an existing class of the same name, the new one replaces it. Note that existing instances of the old class are not updated (there is no generic way to do this).