Closed butschster closed 4 months ago
iframe
We can load body into iframe something like this
<iframe></iframe> <script> async function getSrc() { const res = await fetch("http://example.com/someiframe", { method: 'GET', headers: { // Here you can set any headers you want } }); const blob = await res.blob(); const urlObject = URL.createObjectURL(blob); document.querySelector('iframe').setAttribute("src", urlObject) } getSrc(); </script>
iframe
cannot be loaded with authenticationWe can load body into iframe something like this