dispatch js code in modules files