fetch('https://www.example.com/index.html') .then(res => res.text()) .then(html => console.log(html));
snippet in html

fetch('https://www.example.com/index.html') .then(res => res.text()) .then(html => console.log(html));

user9921

fetch('https://www.gs1us.org')
  .then(res => res.text())
  .then(html => console.log(html));