Example:
- Fetch call that gets a HTML document as response.
- Response gets interpreted as DOM structure.
- One can now use
querySelector
to search for specific elements in that structure.
My idea so far (probably way more complex than it should be):
const responseString = await(await fetch('https://.....')).text();
const element = document.createElement('html');
element.innerHTML = responseString;
There has to be a standard for this right?
Something like: const responseString = await(await fetch('https://.....')).domNodes();