[whatwg] Run javascript code once

 Hi,

 I would like your opinion on this use case:

 I have an app divided in several modules, each one has a javascript 
 code that needs to run to show the module page and init the 
 interactions. The app is not supposed to reload to show each module.

 What is the best way to fetch the javascript code and run it? Add a 
 <script> for that module and remove it when switching to another module? 
 Download using AJAX or other technology and use eval()?

-- 
 Diogo

Received on Thursday, 31 March 2011 03:53:39 UTC