Unable to open a url with 'vscode.previewHtml' in VScode though it works in normal iframe

328 Views Asked by At

Am trying to load https://developers.redhat.com/ in a iframe it works in normal html when i try to open in Chrome but not in firefox. In firefox getting error as "Load denied by X-Frame-Options"

<iframe width="100%" height="600px" frameborder="0" src="https://developers.redhat.com/?interframe=true"
 id="frame2" name="frame1"></iframe>

but when i try to achieve same in VSCode with 'vscode.previewHtml' it won't work. Which browser engine VSCode uses internally? . VSCode example :

provideTextDocumentContent(uri: vscode.Uri): string {
    return `
     <html>
      <head>
      </head>
      <body style="margin: 0; padding: 0; height: 100%;">
       <iframe width="100%" height="600px" frameborder="0" 
        src="https://developers.redhat.com/?interframe=true"
        id="frame2" name="frame1"></iframe>
      </body>
     </html>`
}

though 'vscode.previewHtml' and normal iframe in HTML work fine for a portal which i hosted. Any help or suggestion?

0

There are 0 best solutions below