[
https://issues.apache.org/jira/browse/CB-8313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14278686#comment-14278686
]
_kud commented on CB-8313:
--------------------------
Apparently it's not a trouble with scope or whatever. It's the time to execute
weinre + my code.
I've tried something like
setTimeout(function() {
// execute my code
}, 10000)
and I've got my console.log in weinre interface.
Apparently it depends on the time weinre connects to the server and the
execution of my code.
I've tried by adding your script at the first of my webpage (without async) but
it doesn't change anything.
The solution to find is I should wait that the connection is done by weirne to
execute my code.
Do you have any event to know when weinre is connected to the server to execute
the rest of the code?
> console.log doesn't work well with browserify? troubles with private scope?
> ---------------------------------------------------------------------------
>
> 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]