Adding missing JS-side infrastructure functions.