Generate browser-side JavaScript in static output