Generating body from JavaScript now threadsafe