JavaScript version of ndns query API