Will the face that you want to be operated on be selected? If so, you could just loop through all the edges and get the indices of the ones that are selected(because if a face is selected, it’s edges are too). Kind of a round-about way of doing it but it would work.