timstuyckens / chromeextensions-knockoutjs

The source code for the chrome dev tools extension that allows you to easily debug knockout js apps.
MIT License
140 stars 50 forks source link

Chrome Canary 32.0.1658.0 - model properties appear with quotes #15

Closed timstuyckens closed 10 years ago

timstuyckens commented 11 years ago

In the latest version of Chrome (Version 32.0.1658.0 canary Aura), the Knockout Context list is displaying the view model items incorrectly. They display like: " FirstName": "name" " LastName": "last" etc. The property name is surrounded with quote marks, and it leads with a quote and a space. Properties within a class do not have the quote marks around them.

issuescreenshot

timstuyckens commented 11 years ago

Reason there is a space before the property name: https://github.com/timstuyckens/chromeextensions-knockoutjs/blob/master/pages/js/devtools.js#L97 It sort's automatically, so I placed a space for the properties that are binded to the selected element.

The canary behaviour is not consequent, when I prepend a . (point) then it didn't have the quotes, but $ comes before . Prepending a ! before the properties puts them first, but it isn't pretty: issuescreenshot2

I hope this inconsequent behaviour will be fixed in some future version of Chrome (Canary).

timstuyckens commented 10 years ago

It's in stable for a while, not much I can do I'm afraid