[whatwg] Run javascript code once

Diogo Resende dresende at thinkdigital.pt
Thu Mar 31 03:53:39 PDT 2011


 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


More information about the whatwg mailing list