Ember.js in windows (8) store app requires MSApp.execUnsafeLocalFunction -


we evaluating ember.js use inside javascript windows (8) store application. application not of interrest itself. problems facing related restrictions apply when working dynamic content being injected dom. windows store app runs in "local" context, i.e. way how windows store applications typically built. in local context, html "browser host" of windows store application works in rather restricted mode. instance setting innerhtml, outerhtml or appending content holding script elements blocked if not explicitely encapuslated "proxy" function provide microsoft (msapp.execunsafelocalfunction).

example: ember.view appendto not work out of box. in order work, function has encapsulate jquery call appendto msapp.execunsafelocalfunction proxy function.

original: (in ember.view)

appendto: function(target) {     // schedule dom element created , appended given     // element after bindings have synchronized.     this._insertelementlater(function() {         ember.assert("you cannot append existing ember.view. consider using ember.containerview instead.", !ember.$(target).is('.ember-view') && !ember.$(target).parents().is    ('.ember-view'));         this.$().appendto(target);               });     return this;   }, 

modified work windows store app

appendto: function(target) {     // schedule dom element created , appended given     // element after bindings have synchronized.     this._insertelementlater(function() {         ember.assert("you cannot append existing ember.view. consider using ember.containerview instead.", !ember.$(target).is('.ember-view') && !ember.$(target).parents().is    ('.ember-view'));         var self = this;         msapp.execunsafelocalfunction(function () {             self.$().appendto(target);         });     });     return this;   }, 

are there plans support windows store apps or there advice of how solve problem without patching ember code over? searching lot, seems there not many people trying ember.js working inside javascript windows store application. i'd use our "core" javascript framework building hybrid/cross plattform javascript applications.

libraries used

  • ember-1.0.0-rc.3
  • handlebars-1.0.0-rc.3
  • jquery-2.0.0 (suppose ready windows 8 apps)
  • jquery-ui-1.10.3

microsoft explains limitations mentioned above here:

thank's lot response , ideas... appreciated!

note: posted ember disucssion forum: here


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -