javascript - HashNavigation in cordova wp8 hangs app -
i have next code
function navigate(_hash){ alert('before'); //try#1 window.location.hash = _hash; //try#2 // window.location.href=window.location.href.split("#")[0]+"#" +url; alert('after'); } navigate('someurl') the issue after changing url hash (both variants) app hangs. , interesting thing second alert not firing. app just... crashes after time. nothing in js console. debug log says
the thread 0x*** has exited code 259 (0x103).
google found nothing on that. seems acommon error code. more details: i'm using chaplinjs can't away hash navigation.
second thought chaplin overloads system , caanot anywhere, but(!) putting logs , alerts in source of lib in window.on('hashchange',....) didn't make effort because not there also.
wp 8.0 tried both cordova 4.* , 5.* tried modify xhrxelper.cs not related tonavigation itself.
ps: know jquery mobile suggests disable hashchanges onmobile navigation. can't :(
pps: tried todisable chaplin haschanges
new app({routes: routes, controllersuffix: '-controller', pushstate: false,hashchange:true}) but didn't make results because it's placing hash href check in interval , app hanged again. assume webview problem
more additional info: continious re-run of app makes work (1 run of 10 can make work). that's strange.
emulator , device behave in same way.
update: read somewhere it's critical restrict navigting before "deviceready" event. not case.
update2: create cordova proj scratch. added hash change indeviceready cb , hangs
update3: same code on 8.1 works perfect
Comments
Post a Comment