{"action":"created","issue":{"url":"https://api.github.com/repos/skatejs/skatejs/issues/223","labels_url":"https://api.github.com/repos/skatejs/skatejs/issues/223/labels{/name}","comments_url":"https://api.github.com/repos/skatejs/skatejs/issues/223/comments","events_url":"https://api.github.com/repos/skatejs/skatejs/issues/223/events","html_url":"https://github.com/skatejs/skatejs/issues/223","id":89922776,"number":223,"title":"Typical methods of deleting a property propagate non-ideal results to attribute","user":{"login":"marcoms","id":4211302,"avatar_url":"https://avatars.githubusercontent.com/u/4211302?v=3","gravatar_id":"","url":"https://api.github.com/users/marcoms","html_url":"https://github.com/marcoms","followers_url":"https://api.github.com/users/marcoms/followers","following_url":"https://api.github.com/users/marcoms/following{/other_user}","gists_url":"https://api.github.com/users/marcoms/gists{/gist_id}","starred_url":"https://api.github.com/users/marcoms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcoms/subscriptions","organizations_url":"https://api.github.com/users/marcoms/orgs","repos_url":"https://api.github.com/users/marcoms/repos","events_url":"https://api.github.com/users/marcoms/events{/privacy}","received_events_url":"https://api.github.com/users/marcoms/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/skatejs/skatejs/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/skatejs/skatejs/milestones/12","html_url":"https://github.com/skatejs/skatejs/milestones/0.14.0","labels_url":"https://api.github.com/repos/skatejs/skatejs/milestones/12/labels","id":1026593,"number":12,"title":"0.14.0","description":null,"creator":{"login":"treshugart","id":136556,"avatar_url":"https://avatars.githubusercontent.com/u/136556?v=3","gravatar_id":"","url":"https://api.github.com/users/treshugart","html_url":"https://github.com/treshugart","followers_url":"https://api.github.com/users/treshugart/followers","following_url":"https://api.github.com/users/treshugart/following{/other_user}","gists_url":"https://api.github.com/users/treshugart/gists{/gist_id}","starred_url":"https://api.github.com/users/treshugart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treshugart/subscriptions","organizations_url":"https://api.github.com/users/treshugart/orgs","repos_url":"https://api.github.com/users/treshugart/repos","events_url":"https://api.github.com/users/treshugart/events{/privacy}","received_events_url":"https://api.github.com/users/treshugart/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":46,"state":"open","created_at":"2015-03-18T04:12:49Z","updated_at":"2015-06-22T03:53:14Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-06-21T15:17:55Z","updated_at":"2015-06-23T00:54:15Z","closed_at":null,"body":"```js\r\n> delete elementInstance.customProp;\r\nfalse\r\n\r\n> elementInstance.customProp = undefined;  // -> <x-element custom-prop=\"undefined\"></x-element>\r\n\r\n> elementInstance.customProp = null;  // -> <x-element custom-prop=\"null\"></x-element>\r\n```\r\n\r\nI would expect if the property is set to undefined for the attribute to be removed, however there is no way to achieve this without adding custom behaviour to the properties setter method to directly call `removeAttribue`, if the setter is given null or undefined as a value.\r\n\r\nAFAIK there is no way to have the `delete` operator work as desired since you can't overload it, but I believe the last two are feasible."},"comment":{"url":"https://api.github.com/repos/skatejs/skatejs/issues/comments/114314482","html_url":"https://github.com/skatejs/skatejs/issues/223#issuecomment-114314482","issue_url":"https://api.github.com/repos/skatejs/skatejs/issues/223","id":114314482,"user":{"login":"treshugart","id":136556,"avatar_url":"https://avatars.githubusercontent.com/u/136556?v=3","gravatar_id":"","url":"https://api.github.com/users/treshugart","html_url":"https://github.com/treshugart","followers_url":"https://api.github.com/users/treshugart/followers","following_url":"https://api.github.com/users/treshugart/following{/other_user}","gists_url":"https://api.github.com/users/treshugart/gists{/gist_id}","starred_url":"https://api.github.com/users/treshugart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treshugart/subscriptions","organizations_url":"https://api.github.com/users/treshugart/orgs","repos_url":"https://api.github.com/users/treshugart/repos","events_url":"https://api.github.com/users/treshugart/events{/privacy}","received_events_url":"https://api.github.com/users/treshugart/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T00:54:15Z","updated_at":"2015-06-23T00:54:15Z","body":"`undefined` it is then!\r\n\r\nI don't think patching `setAttribute()` is a good idea because it would completely rewrite the native behaviour. Doing this from a property perspective, though, I think is ok, especially since we define custom behaviour for our properties that are documented."}}