title: Getting ElementID from Fetch?
body: <p>I'm trying to do a fetch request to example.com, and trying to get a specific ElementID from the fetched  webpage into the console log without success.</p>
  <p>I've tried the following code without success yet:</p>
  <pre><code>const url = &quot;https://example.com&quot;; 
  fetch(url) 
    .then(response =&gt; response)
    .then(data =&gt; {
      const resData = data.text();
      console.log(resData);
      document.getElementById(&quot;id&quot;).innerHTML = resData;
    })
  .catch((err) =&gt; console.log(&quot;Can’t access &quot; + url + &quot; response. Blocked by browser?&quot; + err));
  </code></pre>
  <p>I'll be for your suggestions'. Thanks</p>
  <p>I'm getting TypeError: Cannot set property 'innerHTML' of null</p>