vscode-vs-browser
vscode-vs-browser copied to clipboard
Cross-Origin Frame Blocked when Loading Local HTML File
Summary
When trying to open a local HTML file, it doesn't load it because is being blocked (possible due CORS).
I wanted to have a split screen in VSCode where on one screen I see the code and the other screen I can use this plugin to see the changes. Instead of having a separate browser to do it.
Description
In the URL bar, add the path to a local HTML file, then check the console to see an error as such:
Blocked a frame with origin \"vscode-webview://0frhflbpusv2i73i43hco80u16hmrhaf5gt9959na9n2n9kb5c61\" from accessing a cross-origin frame.
I believe that CORS is blocking loading the file. I can open the file in other browsers (such as Firefox, Chrome, etc) but not on this.
Thank you for your time. Have a nice day.