I have div on the page and I need to know what is its position from the right relevant to the viewport. I have tried this code:
const el = this.searchWrapper.getBoundingClientRect();
el.right
but this is not what I need because getBoundingClientRect() starts calculation from the left side but I need calculate what is the distance between element and right side of the viewport like on the screen below
