Name: In method compare, added the JavaScript API.