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

Patrick Mueller commented on CB-8313:
-------------------------------------

Yes, there is a timing issue, as the connection needs to be made to the server, 
and then the weinre ui connected to the target being debugged, etc.

I don't have an explicit event that gets fired when weinre is connected to the 
server, and in some sense, what you're really wanting is a notification that 
some client has connected to the target.  The target doesn't have any access to 
this information - by design.  It also gets complicated because multiple 
clients can connect to a target simultaneously.  The definition of "a good 
time" for when console.log() will be visible to you is ... difficult.

My suggestion would be to add these startup messages you want to log, to an 
array, and then set a timeout which will pull them out of the array and 
console.log() them; and then presumably delete them from the array.

> Add an event to say the connection to the server is ready
> ---------------------------------------------------------
>
>                 Key: CB-8313
>                 URL: https://issues.apache.org/jira/browse/CB-8313
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: weinre
>         Environment: MacOSX latest Yosemite, Firefox latest Nightly
> Weinre 2.0.0-pre-I0Z7U9OV
>            Reporter: _kud
>            Assignee: Patrick Mueller
>            Priority: Blocker
>
> As I can see, the project redefines console. Though, when the scope is 
> private or/and used with browserify, the console.log doesn't work. I have no 
> return.
> Though, if I do:
> ```
> video.addEventListener( 'play', function() {
>     console.log( 'hello' )
> })
> ```
> in my code, it seems to work.
> Do you have any idea why?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to