title: How to get right side position of element?
body: <p>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:</p>
  <pre><code>const el = this.searchWrapper.getBoundingClientRect();
  el.right 
  </code></pre>
  <p>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
  <a href="https://i.stack.imgur.com/PB3QX.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PB3QX.jpg" alt="enter image description here" /></a></p>