{"action":"created","issue":{"url":"https://api.github.com/repos/smfoote/tornado/issues/138","repository_url":"https://api.github.com/repos/smfoote/tornado","labels_url":"https://api.github.com/repos/smfoote/tornado/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/smfoote/tornado/issues/138/comments","events_url":"https://api.github.com/repos/smfoote/tornado/issues/138/events","html_url":"https://github.com/smfoote/tornado/pull/138","id":143630684,"number":138,"title":"Use a state for Attr, drop context.state, use setState and getStates instead","user":{"login":"jimmyhchan","id":718471,"avatar_url":"https://avatars.githubusercontent.com/u/718471?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmyhchan","html_url":"https://github.com/jimmyhchan","followers_url":"https://api.github.com/users/jimmyhchan/followers","following_url":"https://api.github.com/users/jimmyhchan/following{/other_user}","gists_url":"https://api.github.com/users/jimmyhchan/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmyhchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmyhchan/subscriptions","organizations_url":"https://api.github.com/users/jimmyhchan/orgs","repos_url":"https://api.github.com/users/jimmyhchan/repos","events_url":"https://api.github.com/users/jimmyhchan/events{/privacy}","received_events_url":"https://api.github.com/users/jimmyhchan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-25T23:50:59Z","updated_at":"2016-03-28T16:00:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/smfoote/tornado/pulls/138","html_url":"https://github.com/smfoote/tornado/pull/138","diff_url":"https://github.com/smfoote/tornado/pull/138.diff","patch_url":"https://github.com/smfoote/tornado/pull/138.patch"},"body":"i'm closing #137 in favor of this.\r\n\r\nI've moved the logic around states into \r\n 1. a visitorApi accessible from `this`\r\n 2. a Stack in the build instructions that reads from the states set on the `node` and keeps track of the stack of states.\r\n\r\n\r\n\r\nQuestions/TBD:\r\n* instead of `attrIdx` on the framestack, we could have `HTML_ATTRIBUTE` on the stateStack instead."},"comment":{"url":"https://api.github.com/repos/smfoote/tornado/issues/comments/202458745","html_url":"https://github.com/smfoote/tornado/pull/138#issuecomment-202458745","issue_url":"https://api.github.com/repos/smfoote/tornado/issues/138","id":202458745,"user":{"login":"jimmyhchan","id":718471,"avatar_url":"https://avatars.githubusercontent.com/u/718471?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmyhchan","html_url":"https://github.com/jimmyhchan","followers_url":"https://api.github.com/users/jimmyhchan/followers","following_url":"https://api.github.com/users/jimmyhchan/following{/other_user}","gists_url":"https://api.github.com/users/jimmyhchan/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmyhchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmyhchan/subscriptions","organizations_url":"https://api.github.com/users/jimmyhchan/orgs","repos_url":"https://api.github.com/users/jimmyhchan/repos","events_url":"https://api.github.com/users/jimmyhchan/events{/privacy}","received_events_url":"https://api.github.com/users/jimmyhchan/received_events","type":"User","site_admin":false},"created_at":"2016-03-28T16:00:44Z","updated_at":"2016-03-28T16:00:44Z","body":"Do not merge yet.\r\n\r\n```<textarea>{#foo}<div>bar</div>{/foo}</textarea>``` currently fails. (Need to add a test for this.)\r\n\r\nThe current framestack for `tornado_body`'s only knows that it should reset the elements and placeholder stacks (when it does a new tornado stack) but it doesn't know about the `escapable_raw` (or any other state)\r\n\r\nIn order to remove `context.state` (if we choose to keep the generateJS code the same) we must continue to support the logic that bodys will reset state. It's a bit strange to have the same logic in the framestack and in state but IMO they serve two different purposes. \r\n\r\n"}}