Windows 10 App :Host Defined Policy: Inline Script. Resource will be blocked.
I recently ported one of my java script projects to Windows store app and got the error as following CSP14321: Resource violated directive ‘script-src ms-appx: ‘unsafe-eval’ blob:’ in Host Defined Policy: inline script, in ms-appx://13bdc914-5111-4c95-a5e6-82029c5105ec/index.html at line 21 column 12. Resource will be blocked. If you have something like the following, it won’t work <a href=”javascript:void(0)” id=”somelink” onclick=”callMethod();”>Link</a> Since I was using jQuery in the project, I simply used jQuery to bind click event to the element $(“#somelink”).click(function () { callMethod(); }); and Voila, everything works but I had many pages which had this reference and I had to make this change to all pages. After some research I found that there is an alternate way which is much faster to change. By default ms-appx:/// protocol is used in store apps to fetch the content. For web apps specify a specific protocal ms-appx-web which is then used for the app. This can be done[…]