Added js support for destinations.