{"action":"opened","issue":{"url":"https://api.github.com/repos/straker/html-tagged-template/issues/32","repository_url":"https://api.github.com/repos/straker/html-tagged-template","labels_url":"https://api.github.com/repos/straker/html-tagged-template/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/straker/html-tagged-template/issues/32/comments","events_url":"https://api.github.com/repos/straker/html-tagged-template/issues/32/events","html_url":"https://github.com/straker/html-tagged-template/issues/32","id":257183040,"number":32,"title":"Easier boolean attributes","user":{"login":"tabatkins","id":682840,"avatar_url":"https://avatars0.githubusercontent.com/u/682840?v=4","gravatar_id":"","url":"https://api.github.com/users/tabatkins","html_url":"https://github.com/tabatkins","followers_url":"https://api.github.com/users/tabatkins/followers","following_url":"https://api.github.com/users/tabatkins/following{/other_user}","gists_url":"https://api.github.com/users/tabatkins/gists{/gist_id}","starred_url":"https://api.github.com/users/tabatkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tabatkins/subscriptions","organizations_url":"https://api.github.com/users/tabatkins/orgs","repos_url":"https://api.github.com/users/tabatkins/repos","events_url":"https://api.github.com/users/tabatkins/events{/privacy}","received_events_url":"https://api.github.com/users/tabatkins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-12T21:07:53Z","updated_at":"2017-09-12T21:07:53Z","closed_at":null,"author_association":"NONE","body":"From the usage example, it looks like boolean attributes currently have to be manually handled by outputting either their name or an empty string, using a ternary.\r\n\r\nThis is a bit clumsy. It would be a lot more aesthetically appealing if you could write something like:\r\n\r\n```\r\nconst el = html`<video controls?={showControls} url={url}></video>`;\r\n```\r\n\r\nThat is, if the attr name is followed by a `?=` operator, its value is checked as a boolean, and the attribute is either included or omitted accordingly.\r\n\r\n(Any similar sort of syntax would work, of course.)"}}
{"actor":{"display_login":"tabatkins"}}