Due to file-writing security issues we have tried to switch our app from using ms-appx-web: to using ms-appdata:. But it immediately fails because we rely on window.external.notify() which works fine with ms-appx-web: but seems to behave as a no-op with ms-appdata:. As a test we loaded the following html into a WebView object:
<html>
<head>
<script>
function demofunc( str ) {
document.getElementById("demo").innerHTML += str;
window.external.notify( str );
}
</script>
</head>
<body onLoad="demofunc('demofunc()');">
demo <body>
<div id="demo"></div>
</body>
</html>
which produces this result as it should:
demo <body>
demofunc()
BUT, does NOT produce a popup message of any kind. Why? Clearly the demofunc() method is being called to add the second line of output in the demo div, but window.external.notify() is not producing a popup message. Are there special rules regarding notify() along with ms-appdata:?
Update - the question Can't run javascript alerts in universal app's webview at payment gateway is similar and works for ms-appx-web: but not for ms-appdata:. That question catches ScriptNotify() which then uses Windows.UI.Popups.MessageDialog to popup a dialog. With ms-appx-web: the ScriptNotify() is called but with ms-appdata: the ScriptNotify() is not called. That is our problem, there is no popup occurring.