"What's the best way to capture the html from a link in javascript?"
Hey folks!
Trying to figure out how to capture the html from a link in javascript. Like, I wanna grab the entire HTML content of a page when someone clicks a link.
Tried `fetch()` and `innerHTML` stuff, but it’s not working as expected. Am I missing something?
Any quick tips or examples would be awesome!
Thanks in advance
---
*or the troubleshooting version:*
"Why isn't my code able to capture the html from a link in javascript?"
Ugh, so frustrating!
I’m trying to capture the html from a link in javascript, but my code just... doesn’t. Using `fetch()` and then logging the response, but it’s empty or errors out.
Is it a CORS thing? Or am I just dumb? Lol.
Help a dev out!
Hey folks!
Trying to figure out how to capture the html from a link in javascript. Like, I wanna grab the entire HTML content of a page when someone clicks a link.
Tried `fetch()` and `innerHTML` stuff, but it’s not working as expected. Am I missing something?
Any quick tips or examples would be awesome!
Thanks in advance
---
*or the troubleshooting version:*
"Why isn't my code able to capture the html from a link in javascript?"
Ugh, so frustrating!
I’m trying to capture the html from a link in javascript, but my code just... doesn’t. Using `fetch()` and then logging the response, but it’s empty or errors out.
Is it a CORS thing? Or am I just dumb? Lol.
Help a dev out!
