{"action":"opened","issue":{"url":"https://api.github.com/repos/chrsmith/html5rocks/issues/41","labels_url":"https://api.github.com/repos/chrsmith/html5rocks/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/html5rocks/issues/41/comments","events_url":"https://api.github.com/repos/chrsmith/html5rocks/issues/41/events","html_url":"https://github.com/chrsmith/html5rocks/issues/41","id":59306079,"number":41,"title":"Bug with WebDatabase ToDo Tutorial","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/html5rocks/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/html5rocks/labels/Milestone-3","name":"Milestone-3","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/html5rocks/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/html5rocks/labels/Tutorial","name":"Tutorial","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/html5rocks/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-27T22:49:06Z","updated_at":"2015-02-27T22:49:06Z","closed_at":null,"body":"```\nIn Step 1 of the ToDo tutorial, the user is to create an onSuccess method; \nhowever, the onSuccess method will cause the insertion to not re-render when \ncalling the getAllTodoItems function, as the callback tx is an object.\n\nhtml5rocks.webdb.onSuccess = function(tx, r) {\n  // re-render all the data\n  html5rocks.webdb.getAllTodoItems(tx, r);\n}\n\nShould look like:\nhtml5rocks.webdb.onSuccess = function(tx, r) {\n  // re-render all the data\n  html5rocks.webdb.getAllTodoItems(loadTodoItems);\n}\n\nIn the demonstration source, onSuccess is simply a dummy function and the \nwebdb.addTodo success callback is an anonymous function that calls the \ngetAllTodoItems properly. The example text needs to be updated to reflect a \"Do \nwhat you want here\" comment or a working getAllTodoItems with the proper \ncallback function. Another option is update the webdb.addTodo with the proper \ncallback but that might confuse someone new to WebDatabase into wondering why \nthey created an onSuccess method only to not use it.\n```\n\nOriginal issue reported on code.google.com by `ywat...@gmail.com` on 11 Jul 2010 at 5:36"}}