title: 'onElementReady' detecting simultaneous elements
body: <p>I saw this code: <a href="https://gist.github.com/sidneys/ee7a6b80315148ad1fb6847e72a22313" rel="nofollow noreferrer">https://gist.github.com/sidneys/ee7a6b80315148ad1fb6847e72a22313</a></p>
  <p>This is pretty nice, a way to detect changes inside a page. I have the following code in addition to the above one:</p>
  <pre><code>(async () =&gt; {
    const elems = await Promise.all([
      'elem1',
      'elem2',
      'elem3',
    ].map(e =&gt; onElementReady(e, true)));
    console.log(elems);
  })();
  </code></pre>
  <p>The reason why I need to check for multiple elements is that there's a chaotic order of elements loading up via AJAX and one element isn't enough because it might be too early when the page is not fully loaded.</p>
  <p>But this code that was provided by <a href="https://stackoverflow.com/users/3959875/woxxom">@wOxxOm</a> doesn't work well when I need to call it every time a new page has loaded through AJAX. It works the first time when run, afterwards calling again the function that includes the above-mentioned code will no longer work.</p>
  <p>Can you please help me?</p>