cesine / todomvc-for-chrome-extensions

Chrome Extension Tested - MV* Todo apps for Backbone.js, JavaScriptMVC, Ember.js, Dojo, Spine.js, YUILibrary, Knockout.js and more
http://addyosmani.github.com/todomvc
Other
11 stars 1 forks source link

Test Closure in a Chrome Extension #10

Closed cesine closed 12 years ago

cesine commented 12 years ago

Status: it works! But all data is lost if you refresh the page.

cesine commented 12 years ago

Refused to apply inline style because it violates the following Content Security Policy directive: "default-src 'self'". index.html:1

cesine commented 12 years ago

Error when try to refresh page and load previous data:

Uncaught Storage: Invalid value was encountered compiled.js:1

cesine commented 12 years ago

Needs someone who knows closure to make Closure work in a Chrome Extension:

Line 1508: uses an eval return eval("(" + a + ")")

Which results in a perfectly useful JSON, which cannot be used:

a.message
"Invalid JSON string: [{"completed":false,"title":"12e","id":1},{"completed":false,"title":"q3eqr23","id":2}]"
b =  [{"completed":false,"title":"12e","id":1},{"completed":false,"title":"q3eqr23","id":2}]
[
Object
, 
Object
]
Uncaught Storage: Invalid value was encountered compiled.js:3