веб-страница iframe не может вызывать acquVsCodeApi - PullRequest
0 голосов
/ 02 апреля 2020
const panel = vscode.window.createWebviewPanel(
                'mues',
                'mues平台',
                vscode.ViewColumn.Three,
                {
                  enableScripts: true,
                  enableCommandUris: true
                }
              );
              panel.webview.html = getWebviewContent();

    function getWebviewContent(fsPath:string){
     return '<!DOCTYPE html >
        <html lang="en">
        <head>
        <head>
      </head>
      <body>
          <iframe class="vscode-light" id= "iframetest" width="100%" height="100%" src="http://remote.yx.mail.netease.com:9500/muses/index.html#/resource/list" frameborder="0" >
          </iframe>
      </body>
      </html>;
    }

на веб-странице iframe не может вызвать acquVsCodeApi. как я могу вызвать acquVsCodeApi для отправки сообщения в веб-просмотр vscode? веб-страница работает для локального html, обычно. Но в веб-представлении vscode с iframe это не работает. мой вопрос такой же как https://github.com/microsoft/vscode/issues/89694

...