{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/webcomponents/issues/509","repository_url":"https://api.github.com/repos/w3c/webcomponents","labels_url":"https://api.github.com/repos/w3c/webcomponents/issues/509/labels{/name}","comments_url":"https://api.github.com/repos/w3c/webcomponents/issues/509/comments","events_url":"https://api.github.com/repos/w3c/webcomponents/issues/509/events","html_url":"https://github.com/w3c/webcomponents/issues/509","id":157746490,"number":509,"title":"The is=\"\" attribute is confusing? Maybe we should encourage only ES6 class-based extension.","user":{"login":"trusktr","id":297678,"avatar_url":"https://avatars.githubusercontent.com/u/297678?v=3","gravatar_id":"","url":"https://api.github.com/users/trusktr","html_url":"https://github.com/trusktr","followers_url":"https://api.github.com/users/trusktr/followers","following_url":"https://api.github.com/users/trusktr/following{/other_user}","gists_url":"https://api.github.com/users/trusktr/gists{/gist_id}","starred_url":"https://api.github.com/users/trusktr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trusktr/subscriptions","organizations_url":"https://api.github.com/users/trusktr/orgs","repos_url":"https://api.github.com/users/trusktr/repos","events_url":"https://api.github.com/users/trusktr/events{/privacy}","received_events_url":"https://api.github.com/users/trusktr/received_events","type":"User","site_admin":false},"labels":[{"id":228779701,"url":"https://api.github.com/repos/w3c/webcomponents/labels/custom-elements","name":"custom-elements","color":"5319e7","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":203,"created_at":"2016-05-31T19:06:24Z","updated_at":"2016-12-08T08:48:38Z","closed_at":"2016-07-19T10:15:02Z","body":"(copied from comment below): The `is=\"\"` API can be confusing. For example (in current v0 API):\n\n``` html\n<my-el></my-el>\n```\n\n``` js\nclass MyEl extends HTMLElement { /*... */ }\nMyEl.extends = 'div'\ndocument.registerElement('my-el', MyEl)\n\n// ...\n\ndocument.querySelector('my-el') instanceof MyEl // true or false?\n```\n\n---\n\nThe [spec](https://w3c.github.io/webcomponents/spec/custom/#custom-elements-customized-builtin-example) says:\n\n> Trying to use a customized built-in element as an autonomous custom element will not work; that is, `<plastic-button>Click me?</plastic-button>` will simply create an `HTMLElement` with no special behaviour.\n\nBut, in my mind, that's just what the _spec says_, but not that it has to be that way. Why has it been decided for it to be that way?\n\nI believe that we can specify this type of information in the `customElement.define()` call rather than in the markup. For example, that very same document shows this example:\n\n``` js\ncustomElements.define(\"plastic-button\", PlasticButton, { extends: \"button\" });\n```\n\nObviously, `plastic-button` extends `button` as defined right there in that call to `define()`, so why do we need a redundant `is=\"\"` attribute to be applied onto `button`? I think the following HTML and JavaScript is much nicer:\n\n``` html\n<!-- before: <button is=\"plastic-button\">Click me</button> -->\n<plastic-button>Click me</plastic-button>\n```\n\n``` js\n// before: const plasticButton = document.createElement(\"button\", { is: \"plastic-button\" });\nconst plasticButton = document.createElement(\"plastic-button\");\n```\n\nThe necessary info for the HTML engine to upgrade that element properly is right there, in `{ extends: \"button\" }`. I do believe there's some way to make this work (as there always is with software, because we make it, it is ours, we make software do what we want, and this is absolutely true without me having to read a single line of browser source code to know it), and that `is=\"\"` is not required and can be completely removed from the spec because it seems like a hack to some limitation that can be solved somehow else (I don't know what that \"somehow\" is specifically, but I do know that the \"somehow\" exists because there's always some way to modify software to make it behave how we want within the limitations of current hardware where current hardware is not imposing any limitation on this feature).\n"},"comment":{"url":"https://api.github.com/repos/w3c/webcomponents/issues/comments/265685879","html_url":"https://github.com/w3c/webcomponents/issues/509#issuecomment-265685879","issue_url":"https://api.github.com/repos/w3c/webcomponents/issues/509","id":265685879,"user":{"login":"richardkazuomiller","id":1243814,"avatar_url":"https://avatars.githubusercontent.com/u/1243814?v=3","gravatar_id":"","url":"https://api.github.com/users/richardkazuomiller","html_url":"https://github.com/richardkazuomiller","followers_url":"https://api.github.com/users/richardkazuomiller/followers","following_url":"https://api.github.com/users/richardkazuomiller/following{/other_user}","gists_url":"https://api.github.com/users/richardkazuomiller/gists{/gist_id}","starred_url":"https://api.github.com/users/richardkazuomiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardkazuomiller/subscriptions","organizations_url":"https://api.github.com/users/richardkazuomiller/orgs","repos_url":"https://api.github.com/users/richardkazuomiller/repos","events_url":"https://api.github.com/users/richardkazuomiller/events{/privacy}","received_events_url":"https://api.github.com/users/richardkazuomiller/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T08:48:38Z","updated_at":"2016-12-08T08:48:38Z","body":"@oleersoy \r\n\r\n>  If you are developing anything using the is attribute then that means that the corresponding form of PE that it enables is a priority. Since that's a priority the element that the is attribute is on cannot collaborate with any other custom element on the page\r\n\r\nWhy not?"}}
{"actor":{"display_login":"richardkazuomiller"}}