I have web app running on a local web server that I am trying to interact with via a webview. I have link that will return a PDF where content-disposition is attachment (it is a requirement that the file be downloaded and opened by the system default pdf reader).
I have looked through what I can find on dealing with permission requests in Chrome apps. At this point I can't even get an acknowledgement that the app is even receiving a permission request. Am I doing something wrong? Probably. What is it?
Here is the link from my web app.
<a href="/mypage/publication_file/8827">Download</a>
Here is my manifest.
{
"app": {
"background": {
"scripts": [ "main.js" ]
}
},
"icons": {
"128": "icon_128.png",
"16": "icon_16.png"
},
"manifest_version": 2,
"minimum_chrome_version": "30",
"name": "PED",
"permissions": [ "webview" ],
"version": "0.0.0"
}
Here is my JS.
chrome.app.runtime.onLaunched.addListener(function() {
runApp();
});
function runApp() {
chrome.app.window.create('browser.html', {
bounds: {
'width': 1280,
'height': 768
}
});
}
var webview = document.getElementById("webview");
webview.addEventListener('permissionrequest', function(e) {
console.log("permission requested")
});
When I click on my link I don't get my message on the console.