{"action":"created","issue":{"url":"https://api.github.com/repos/Polymer/polymer/issues/1812","labels_url":"https://api.github.com/repos/Polymer/polymer/issues/1812/labels{/name}","comments_url":"https://api.github.com/repos/Polymer/polymer/issues/1812/comments","events_url":"https://api.github.com/repos/Polymer/polymer/issues/1812/events","html_url":"https://github.com/Polymer/polymer/issues/1812","id":86744611,"number":1812,"title":"Can't declare Boolean attributes with default of true?","user":{"login":"JanMiksovsky","id":86139,"avatar_url":"https://avatars.githubusercontent.com/u/86139?v=3","gravatar_id":"","url":"https://api.github.com/users/JanMiksovsky","html_url":"https://github.com/JanMiksovsky","followers_url":"https://api.github.com/users/JanMiksovsky/followers","following_url":"https://api.github.com/users/JanMiksovsky/following{/other_user}","gists_url":"https://api.github.com/users/JanMiksovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/JanMiksovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanMiksovsky/subscriptions","organizations_url":"https://api.github.com/users/JanMiksovsky/orgs","repos_url":"https://api.github.com/users/JanMiksovsky/repos","events_url":"https://api.github.com/users/JanMiksovsky/events{/privacy}","received_events_url":"https://api.github.com/users/JanMiksovsky/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-06-09T21:41:51Z","updated_at":"2015-09-30T00:57:05Z","closed_at":"2015-06-15T22:17:59Z","body":"The way attributes are deserialized seems to preclude the declaration of attributes that default to true.\r\n\r\nFrom the docs: \"Boolean properties set based on the existence of the attribute: if the attribute exists at all, its value is true, regardless of its string-value (and the value is only false if the attribute does not exist).\"\r\n\r\nThat works for attributes with a default value of false. If someone wants the default value, they leave the attribute off. If they want the non-default value of true, they can explicitly say attr=\"true\" (or any string).\r\n\r\nBut I don't see how to declare support for a Boolean attribute that defaults to true. See http://jsbin.com/neyaxu/1/edit?html,output. Here, I want to be able to override the default behavior by saying red=\"false\". Since Polymer interprets any string value of true, however, it doesn't appear to be possible to declaratively set the attribute to false. That can be done imperatively, but it should also be possible imperatively.\r\n\r\nWhile an attribute's logic can always be flipped such that its default value is false, there are cases where an attribute's obviously API name naturally suggests a default value of true."},"comment":{"url":"https://api.github.com/repos/Polymer/polymer/issues/comments/144231255","html_url":"https://github.com/Polymer/polymer/issues/1812#issuecomment-144231255","issue_url":"https://api.github.com/repos/Polymer/polymer/issues/1812","id":144231255,"user":{"login":"jptrainor","id":3492380,"avatar_url":"https://avatars.githubusercontent.com/u/3492380?v=3","gravatar_id":"","url":"https://api.github.com/users/jptrainor","html_url":"https://github.com/jptrainor","followers_url":"https://api.github.com/users/jptrainor/followers","following_url":"https://api.github.com/users/jptrainor/following{/other_user}","gists_url":"https://api.github.com/users/jptrainor/gists{/gist_id}","starred_url":"https://api.github.com/users/jptrainor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jptrainor/subscriptions","organizations_url":"https://api.github.com/users/jptrainor/orgs","repos_url":"https://api.github.com/users/jptrainor/repos","events_url":"https://api.github.com/users/jptrainor/events{/privacy}","received_events_url":"https://api.github.com/users/jptrainor/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T00:57:05Z","updated_at":"2015-09-30T00:57:05Z","body":"Many thanks.  I got it working with the binding.  In my state of confusion when I first countered this I issue I messed up my binding declaration and concluded incorrectly that it didn't work."}}