so i'm doing some testing to see the position of en of an object in a frame by using this code
function showCoords(event) {
var x = event.clientX;
var y = event.clientY;
var coords = "X coords: " + x + ", Y coords: " + y;
document.getElementById("demo").innerHTML = coords;
}
But it show the position in pixels from top and left, is there a way to show it in different format like vw from left and vh from top instead of in pixels?