Javascript 带有PDF的新选项卡-下载按钮不适用于Chrome

Javascript 带有PDF的新选项卡-下载按钮不适用于Chrome,javascript,google-chrome,pdf,download,base64,Javascript,Google Chrome,Pdf,Download,Base64,当用户点击一个按钮时,我向我的服务器发送一个请求,它会发回一个pdf base64 然后,我在一个新选项卡中打开它,但是Chrome预览中的下载按钮不起作用,当我单击它时,没有任何操作。它在Firefox上运行良好 Chrome预览下载按钮: 定义变量iframeHtml: 让iframeHtml=` 设置手动框架(); 功能设置手册框架(){ document.getElementById('ManualFrame').setAttribute('height',screen.height)

当用户点击一个按钮时,我向我的服务器发送一个请求,它会发回一个pdf base64

然后,我在一个新选项卡中打开它,但是Chrome预览中的下载按钮不起作用,当我单击它时,没有任何操作。它在Firefox上运行良好

Chrome预览下载按钮:

定义变量iframeHtml:

让iframeHtml=`
设置手动框架();
功能设置手册框架(){
document.getElementById('ManualFrame').setAttribute('height',screen.height);
document.getElementById('ManualFrame').setAttribute('width',screen.width);
document.getElementById('ManualFrame').setAttribute('src',“数据:application/pdf;base64,${pdfBase64}”);
}
`;
然后在新选项卡中打开它:

让newWindow=window.open();
newWindow.document.write(iframeHtml);
我测试过的Chrome版本:
版本:67.0.3396.79(官方版本)(64位)

版本:66.0.3359.181(官方版本)32位

这里有相同的问题您使用的是哪个版本的Chrome?@LonelyPlaneteer我已经将测试过的版本添加到了question@JairoOdeliJunior:有趣。我使用的是相同的版本。相同的代码。不能重现这个问题。