Should be generate_js() now that it's static