Dear Robert,
I'm indeed developing 3D custom widgets for WAB 2.17
I'm sorry, but I totally don't understand your example. I just started with this era which is very new to me.
I don't need extent. I have pair of wkid:2039 x,y coordinates of some point location and I need to evaluate the geographic wkid:4326 long/lat. I know that the WAB sceneView map is wkid:4326 (actually it uses WGS_1984_Web_Mercator_Auxiliary_Sphere (3857) which is also called102100 spatial reference - I don't know exactly what all this means...), and that the transformation forward/nackward to wkid:2039 is TFWKID:108021 and that is all inputs I know.
I have not learned yet the "project/projection" subject involving with transformatons and besides getting help with my specific question, I'd like to get hints what are the links to look in order to properly learn and understand this subject which seem to me a complicated one. I appreciate your help very much.
I see that webMercatorUtils has xyToLngLat() function, but it ises wkid:3857 while I need to convert for wkid:2039 ... so I understand I am missing something important in how to do conversions...
P.S. I used some independent code (from github), but the results were not accurate, so I must use esri functions.