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

Patrick Mueller commented on CB-8315:
-------------------------------------

I just tried the following, where lines prefixed with ">" are things I entered, 
other lines were the output in the console.

{noformat}
> x = 1
> console.log(x)
1

> x = {a: "1"}
> console.log(x)
Object
  a: "1"
  __proto__: —
{noformat}

Appears to work for "basic" objects.  So, still thinking that you are sending 
console.log() either a native object, or perhaps an object with some properties 
that are natives that the weinre code can't handle, but that can survive a 
JSON.stringification().

> "Object" doesn't display its attributes
> ---------------------------------------
>
>                 Key: CB-8315
>                 URL: https://issues.apache.org/jira/browse/CB-8315
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: weinre
>         Environment: Firefox nightly on MacOSX Yosemite
>            Reporter: _kud
>            Assignee: Patrick Mueller
>            Priority: Blocker
>
> When you console.log() an object, you can see the type "Object". But when you 
> click on the arrow, it doesn't display the attributes:
> ```
> 2015-01-15T14:23:53.342Z weinre:    
> NetworkNotify.setInitialContent([35,"{\"channel\":{\"name\":\"Euronews\"},\"program\":{\"progress\":21.666666666667,\"startAt\":\"15:23\",\"endAt\":\"15:27\",\"title\":\"Le
>  
> mag\",\"genre\":\"Magazine\",\"subgenre\":\"D\\u00e9couverte\"}}","XHR",null])
> 2015-01-15T14:23:53.342Z weinre:    
> NetworkNotify.didFinishLoading([35,1421331832.673,null])
> 2015-01-15T14:23:53.346Z weinre: 
> --------------------------------------------------
> 2015-01-15T14:23:53.346Z weinre: POST /c-48 [request]
> 2015-01-15T14:23:53.346Z weinre:    WeinreClientCommands.logError(["weinre: 
> invocation exception on Object.childNodeInserted(): TypeError: parent is 
> undefined",null])
> 2015-01-15T14:23:53.346Z weinre: client c-48: weinre: invocation exception on 
> Object.childNodeInserted(): TypeError: parent is undefined
> ```
> I had to do console.log(JSON.stringify(Object)) to get a correct display.



--
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