Search code examples
javascriptbrowserdevtools

Unable to get the html body from a website using javascript from the browser console


As far as I know, I've only had this issue come from wolframalpha.com e.g. https://www.wolframalpha.com/input/?i=Factor%5Bx%5E2++-+++16%5D

My goal is to get html using javascript. So opening the developer tools I wrote

document.body.innerHTML;

But get Uh oh! Wolfram|Alpha doesn't run without JavaScript.</span></span><div class=\"HHXp5 _2CYJA\"><span>Please enable JavaScript., as PART of the response and not the full contents of the webpage.

I didn't want to make assumptions about how the website is operating, so I am going off with the information I got back and framed my question this way. Javascript is clearly enabled and I am guessing some js functionality is redirected prior to the page loading.

I've tried this with the latest chrome incognito and safari.


Solution

  • Taking the suggestions from the comments, the issue was resolved after reenabling javascript on my site settings.