在我的Cordova应用程序中,我使用InAppBrowser呈现PDF文档
window.open = cordova.InAppBrowser.open;
document.onclick = function (e) {
e = e || window.event;
var element = (e.target || e.srcElement).closest("a");
if (element && element.getAttribute('target') === '_blank') {
win
我看过其他的问题,但是没有一个解决方案有效
这是我的代码行:
cordova.InAppBrowser.open(url, target, options);
以下是错误:
cordova is not defined (如果我在代码中删除cordova,则为InAppBrowser is not defined )
以下是我的config.xml包括:
(...)
<gap:plugin name="org.apache.cordova.inappbrowser" />
(...)
<access origin="*"/>
&l
当我尝试启动inappbrowser时,我一直收到以下错误:
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8000/cordova_plugins.js
当我查找"cordova/platforms/android/assets/www/cordova_plugins.js“时,该文件确实丢失了。
奇怪的是,我发现:
Writing out cordova_plugins.js...
我的构建过程如下所示:
cordova create c
我试图打开pdf文件,通过api接收从角科尔多瓦应用程序。
this.laccountservice.downloadPDF(order).subscribe(
(res) => {
var files= new Blob([res], { type: 'application/pdf' })
console.log(files)
var fileURL = URL.createObjectURL(files);
//window.open(fileURL); // if you want to open
目前,我正在开发一个Cordova应用程序,没有一个文档非常清楚这三种显示网站的方法之间的区别。
这与文档的范围有关,在任何地方:
_self - opens in the Cordova WebView if url is in the white-list, else it opens in the InAppBrowser
_blank - always open in the InAppBrowser
_system - always open in the system web browser
而且,它也没有说明我必须在哪里白名单URL。有什么建议吗?