0

I have a Cordova based Application. Which works perfectly on IOS and android platform. When I am building the Same Application for windows8.It crashes on append function.

   $("#mainDiv").append(LoginTemplate);

I want to maintain the same code base for all platform . Is there any way we can allow the same on windows8 without adding this function everywhere?

 MSApp.execUnsafeLocalFunction(function() {

  $("#mainDiv").append(LoginTemplate);

});

Is there any way we can put this in config file? So that append function will allowed for windows8. The reason why I want to use this beacause I don't want to maintain a different code base for windows8 just for this.

1
  • ("#mainDiv") should be $("#mainDiv"). Is this only here or also in the actual script? Commented Jul 10, 2015 at 6:07

1 Answer 1

1

Microsoft has released a shim that should solve your problem: https://github.com/MSOpenTech/winstore-jscompat

It basically wraps all the "unsafe" operations in a MSApp.execUnsafeLocalfunction for you automatically.

Sign up to request clarification or add additional context in comments.

3 Comments

Its defintly solved my problm,but it is disabling my popover. Any idea how can enable this popover alone?
I'm afraid I have no idea. What popover are you using?
$('[rel=itemspopover]').popover({ html:true, placement:'top', content:function(){ return $($(this).data('contentwrapper')).html(); } });

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.