Cross domain iframe position

I am trying to find a simple way to get the outer absolute position of the iframe on the page. What I'm looking for is similar to the following:

$(window.parent.document).find("#iframe").position().top

but it works cross-domain. Is the window.postMessage function the only / best way to solve this problem, or is there an easier way?

+3
source share

Source: https://habr.com/ru/post/1778770/


All Articles