[ 
https://issues.apache.org/jira/browse/CB-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13808745#comment-13808745
 ] 

Patrick Mueller commented on CB-5219:
-------------------------------------

If it says IE Mobile 10.0, then according to caniuse, it must be replaceState() 
must be available.  Testing with hello world would seem to confirm that.

Just want to make sure that, after a replaceState() call, everything else is 
fine, just weinre is dead.  Can you add some code after the replaceState() - 
whatever you can check - either a console.log(), update a DOM element somehow, 
etc.  Sometimes when a "fatal error" occurs, weinre dies, and so does the rest 
of the app, but it's not noticeable because the web view doesn't change.

Assuming the app is still alive after the replaceState() call, it smells like 
perhaps the replaceState() call is cancelling XHRs or timers or something.  At 
that point, I have no way of checking, not having a WP8 device.  I'd post a 
note up on the phonegap google group [1] asking for someone with WP8 experience 
to help out.  There were some MS devs doing some weinre work at one time, 
hopefully they can help out.

If replaceState() is in fact killing weinre somehow, one possible fix would be 
to monkeypatch replaceState() to call the original replaceState(), and then get 
the weinre stuff running once again - whatever that means.

[1] https://groups.google.com/forum/#!forum/phonegap


> weinre disconnects when history.replaceState is used
> ----------------------------------------------------
>
>                 Key: CB-5219
>                 URL: https://issues.apache.org/jira/browse/CB-5219
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: WP8
>    Affects Versions: 3.1.0
>         Environment: Windows 8, Visual Studio 2012
>            Reporter: Björn Andersson
>            Assignee: Patrick Mueller
>
> I got an app that uses weinre and when developing on Android, BB10 and iOS I 
> never had any issues. But on WP8 it kept disconnect pretty much instantly 
> after connecting.
> I found that if I do:
> {code}
> history.replaceState(null, 'weinre, say bye-bye', '/some-fake-url')
> {code}
> Weinre will disconnect. I've tried this with the Cordova hello world app and 
> just adding in that line above disconnects weinre.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to