javascript - Cordova whitelist plugin manually detect blocked navigation (event) -


i building ionic app using cordova-whitelist-plugin whitelist url's navigation.

this working fine, detect when , url being blocked plugin. know (at least in xcode) log appears when url being blocked, looking kind of javascript event detect it.

i pretty sure there no cordova-whitelist-plugin javascript api available, might overlooking something.

so question is: know if there way detect blocked (by cordova-whitelist-plugin) navigation in javascript?

in absence of other answers, indirect answer:

cordova-plugin-whitelist recommends migrating "content security policy" meta tag instead of plugin functionality. https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist/

content security policy request violations have event you're asking about, seems work when using <meta http-equiv="content-security-policy">. not cordova-plugin-whitelist plugin.

document.addeventlistener('securitypolicyviolation', function(e) {     alert(json.stringify(e)); }); 

(i similar event works plugin.)


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -