Using AppendTo / jquery-win8 in Win8 Applications

I'm thinking about looking at the ToDoMVC samples and tried to port them to a Win8 JS app by just copying and pasting the code, but also having the appropriate WinJS references.

Due to MS security principles around InnerHTML etc. I am referring to jQuery-Win8 which is trying to work around the problem, however in Angular and Backbone when I run my application I get an exception in appendChild

I've read in some places that you will be able to continue running the application, but if I click "Continue" in case of an exception, the application will still shut down.

Can anyone point me in the right direction to get this running?

thank

UPDATE: Here's a screenshot of the exception in VSenter image description here

+3


source to share


1 answer


The appendTo version removes errors thrown when jQuery runs at load time. You may still have code that violates Microsoft's security model. Microsoft is trying to inform you that there is a risk of undeclared markup on your page.

If you are sure that this is not the case, you can try setting jQuery.isUnsafe

to true

after including the appendTo library. This should wrap up all possible unsafe calls with a help MSApp.execUnsafeLocalFunction

so Microsoft doesn't complain.



Note. This flag is disabled by default.

+6


source







All Articles