Update JavaScript implementation.