Move processing to JavaScript code.