add promises support to widlparser