{"action":"created","comment":{"url":"https://api.github.com/repos/whatwg/html/pulls/comments/165808292","pull_request_review_id":93810372,"id":165808292,"diff_hunk":"@@ -109903,7 +109920,64 @@ Hello.&lt;/pre></pre>\n    data-x=\"\">Hello.</code>\".</p>\n   </div>\n \n-  <p><dfn id=\"escapingString\">Escaping a string</dfn> (for the purposes of the algorithm above)\n+  <p id=\"attr-is-during-serialization\">Because of the special role of the <code\n+  data-x=\"attr-is\">is</code> attribute in signaling the creation of <span data-x=\"customized\n+  built-in element\">customized built-in elements</span>, in that it provides a mechanism for parsed\n+  HTML to set the element's <span data-x=\"concept-element-is-value\"><code data-x=\"\">is</code>\n+  value</span>, we special-case its handling during serialization.This ensures that an element's\n+  <span data-x=\"concept-element-is-value\"><code data-x=\"\">is</code> value</span> is preserved\n+  through serialize-parse roundtrips.</p>\n+\n+  <div class=\"example\">\n+    <p>When creating a <span>customized built-in element</span> via the parser, a developer uses the <code\n+    data-x=\"attr-is\">is</code> attribute directly; in such cases serialize-parse roundtrips work fine.</p>\n+\n+    <pre>&lt;script>\n+ window.SuperP = class extends HTMLParagraphElement {};\n+ customElements.define(\"super-p\", SuperP, { extends: \"p\" });\n+&lt;/script>\n+\n+&lt;div id=\"container\">&lt;p is=\"super-p\">Superb!&lt;/p>&lt;/div>\n+\n+&lt;script>\n+ console.log(container.innerHTML); // &lt;p is=\"super-p\">\n+ container.innerHTML = container.innerHTML;\n+ console.log(container.innerHTML); // &lt;p is=\"super-p\">\n+ console.assert(container.firstChild instanceof SuperP);\n+&lt;/script></pre>\n+\n+    <p>But when creating a customized built-in element via its <span data-x=\"custom element\n+    constructor\">constructor</span> or via <code\n+    data-x=\"dom-Document-createElement\">createElement()</code>, the <code data-x=\"attr-is\">is</code>\n+    attribute is not added. Instead, the <span data-x=\"concept-element-is-value\"><code\n+    data-x=\"\">is</code> value</span> (which is what the custom elements machinery uses) is set\n+    without intermediating through an attribute.</p>\n+\n+    <pre>&lt;script>\n+ container.innerHTML = \"\";\n+ const p = document.createElement(\"p\", { is: \"super-p\" });\n+ container.appendChild(p);\n+\n+ // The is attribute is not present in the DOM:\n+ console.assert(!p.hasAttribute(\"is\"));\n+\n+ // But the element is still a super-p:\n+ console.assert(p instanceof SuperP);\n+&lt;/script></pre>\n+\n+    <p>To ensure that serialize-parse roundtrips still work, the serialization process explicitly\n+    writes out the element's <span data-x=\"concept-element-is-value\"><code data-x=\"\">is</code>\n+    value</span> as an <code data-x=\"attr-is\">is</code> attribute:</p>\n+\n+    <pre>&lt;script>\n+ console.log(container.innerHTML); // &lt;p is=\"super-p\">\n+ container.innerHTML = container.innerHTML;\n+ console.log(container.innerHTML); // &lt;p is=\"super-p\">\n+ console.assert(container.firstChild instanceof SuperP);\n+&lt;/script></pre>\n+  </div>\n+\n+    <p><dfn id=\"escapingString\">Escaping a string</dfn> (for the purposes of the algorithm above)","path":"source","position":124,"original_position":124,"commit_id":"e693cb185c009dc87f72d9827da224967a568409","original_commit_id":"e693cb185c009dc87f72d9827da224967a568409","user":{"login":"annevk","id":1544111,"avatar_url":"https://avatars0.githubusercontent.com/u/1544111?v=4","gravatar_id":"","url":"https://api.github.com/users/annevk","html_url":"https://github.com/annevk","followers_url":"https://api.github.com/users/annevk/followers","following_url":"https://api.github.com/users/annevk/following{/other_user}","gists_url":"https://api.github.com/users/annevk/gists{/gist_id}","starred_url":"https://api.github.com/users/annevk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annevk/subscriptions","organizations_url":"https://api.github.com/users/annevk/orgs","repos_url":"https://api.github.com/users/annevk/repos","events_url":"https://api.github.com/users/annevk/events{/privacy}","received_events_url":"https://api.github.com/users/annevk/received_events","type":"User","site_admin":false},"body":"Too much indentation.","created_at":"2018-02-03T07:57:13Z","updated_at":"2018-02-03T07:58:03Z","html_url":"https://github.com/whatwg/html/pull/3444#discussion_r165808292","pull_request_url":"https://api.github.com/repos/whatwg/html/pulls/3444","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/whatwg/html/pulls/comments/165808292"},"html":{"href":"https://github.com/whatwg/html/pull/3444#discussion_r165808292"},"pull_request":{"href":"https://api.github.com/repos/whatwg/html/pulls/3444"}}},"pull_request":{"url":"https://api.github.com/repos/whatwg/html/pulls/3444","id":166865900,"html_url":"https://github.com/whatwg/html/pull/3444","diff_url":"https://github.com/whatwg/html/pull/3444.diff","patch_url":"https://github.com/whatwg/html/pull/3444.patch","issue_url":"https://api.github.com/repos/whatwg/html/issues/3444","number":3444,"state":"open","locked":false,"title":"Update customized built-in elements is=\"\" interaction","user":{"login":"domenic","id":617481,"avatar_url":"https://avatars0.githubusercontent.com/u/617481?v=4","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"body":"This follows the DOM changes in https://github.com/whatwg/dom/pull/566,\nand is part of fixing https://github.com/whatwg/html/issues/3402.\n\nThe normative changes are to the serialization algorithm, which now\nwrites out the element's is value as its is=\"\" attribute, if no actual\nis=\"\" attribute is present. The rest of the changes are to introductory\ntext about customized built-in elements.\n\nTests for this will presumably be done at the same time as those for the DOM changes.\n\n\n<!--\n    This comment and the below content is programatically generated.\n    You may add a comma-separated list of anchors you'd like a\n    direct link to below (e.g. #idl-serializers, #idl-sequence):\n\n    Don't remove this comment or modify anything below this line.\n    If you don't want a preview generated for this pull request,\n    just replace the whole of this comment's content by \"no preview\"\n    and remove what's below.\n-->\n***\n<a href=\"https://whatpr.org/html/3444/custom-elements.html\" title=\"Last updated on Feb 2, 2018, 5:59 PM GMT (e693cb1)\">/custom-elements.html</a>  ( <a href=\"https://whatpr.org/html/3444/2102913...e693cb1/custom-elements.html\" title=\"Last updated on Feb 2, 2018, 5:59 PM GMT (e693cb1)\">diff</a> )\n<a href=\"https://whatpr.org/html/3444/parsing.html\" title=\"Last updated on Feb 2, 2018, 5:59 PM GMT (e693cb1)\">/parsing.html</a>  ( <a href=\"https://whatpr.org/html/3444/2102913...e693cb1/parsing.html\" title=\"Last updated on Feb 2, 2018, 5:59 PM GMT (e693cb1)\">diff</a> )","created_at":"2018-02-02T17:58:37Z","updated_at":"2018-02-03T07:58:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6203a6a8ab7146689d32aa12470f02c04cbcc6f0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/whatwg/html/pulls/3444/commits","review_comments_url":"https://api.github.com/repos/whatwg/html/pulls/3444/comments","review_comment_url":"https://api.github.com/repos/whatwg/html/pulls/comments{/number}","comments_url":"https://api.github.com/repos/whatwg/html/issues/3444/comments","statuses_url":"https://api.github.com/repos/whatwg/html/statuses/e693cb185c009dc87f72d9827da224967a568409","head":{"label":"whatwg:cbie-htmlconstructor-fix","ref":"cbie-htmlconstructor-fix","sha":"e693cb185c009dc87f72d9827da224967a568409","user":{"login":"whatwg","id":2226336,"avatar_url":"https://avatars1.githubusercontent.com/u/2226336?v=4","gravatar_id":"","url":"https://api.github.com/users/whatwg","html_url":"https://github.com/whatwg","followers_url":"https://api.github.com/users/whatwg/followers","following_url":"https://api.github.com/users/whatwg/following{/other_user}","gists_url":"https://api.github.com/users/whatwg/gists{/gist_id}","starred_url":"https://api.github.com/users/whatwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatwg/subscriptions","organizations_url":"https://api.github.com/users/whatwg/orgs","repos_url":"https://api.github.com/users/whatwg/repos","events_url":"https://api.github.com/users/whatwg/events{/privacy}","received_events_url":"https://api.github.com/users/whatwg/received_events","type":"Organization","site_admin":false},"repo":{"id":11969507,"name":"html","full_name":"whatwg/html","owner":{"login":"whatwg","id":2226336,"avatar_url":"https://avatars1.githubusercontent.com/u/2226336?v=4","gravatar_id":"","url":"https://api.github.com/users/whatwg","html_url":"https://github.com/whatwg","followers_url":"https://api.github.com/users/whatwg/followers","following_url":"https://api.github.com/users/whatwg/following{/other_user}","gists_url":"https://api.github.com/users/whatwg/gists{/gist_id}","starred_url":"https://api.github.com/users/whatwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatwg/subscriptions","organizations_url":"https://api.github.com/users/whatwg/orgs","repos_url":"https://api.github.com/users/whatwg/repos","events_url":"https://api.github.com/users/whatwg/events{/privacy}","received_events_url":"https://api.github.com/users/whatwg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/whatwg/html","description":"HTML Standard","fork":false,"url":"https://api.github.com/repos/whatwg/html","forks_url":"https://api.github.com/repos/whatwg/html/forks","keys_url":"https://api.github.com/repos/whatwg/html/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whatwg/html/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whatwg/html/teams","hooks_url":"https://api.github.com/repos/whatwg/html/hooks","issue_events_url":"https://api.github.com/repos/whatwg/html/issues/events{/number}","events_url":"https://api.github.com/repos/whatwg/html/events","assignees_url":"https://api.github.com/repos/whatwg/html/assignees{/user}","branches_url":"https://api.github.com/repos/whatwg/html/branches{/branch}","tags_url":"https://api.github.com/repos/whatwg/html/tags","blobs_url":"https://api.github.com/repos/whatwg/html/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whatwg/html/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whatwg/html/git/refs{/sha}","trees_url":"https://api.github.com/repos/whatwg/html/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whatwg/html/statuses/{sha}","languages_url":"https://api.github.com/repos/whatwg/html/languages","stargazers_url":"https://api.github.com/repos/whatwg/html/stargazers","contributors_url":"https://api.github.com/repos/whatwg/html/contributors","subscribers_url":"https://api.github.com/repos/whatwg/html/subscribers","subscription_url":"https://api.github.com/repos/whatwg/html/subscription","commits_url":"https://api.github.com/repos/whatwg/html/commits{/sha}","git_commits_url":"https://api.github.com/repos/whatwg/html/git/commits{/sha}","comments_url":"https://api.github.com/repos/whatwg/html/comments{/number}","issue_comment_url":"https://api.github.com/repos/whatwg/html/issues/comments{/number}","contents_url":"https://api.github.com/repos/whatwg/html/contents/{+path}","compare_url":"https://api.github.com/repos/whatwg/html/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whatwg/html/merges","archive_url":"https://api.github.com/repos/whatwg/html/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whatwg/html/downloads","issues_url":"https://api.github.com/repos/whatwg/html/issues{/number}","pulls_url":"https://api.github.com/repos/whatwg/html/pulls{/number}","milestones_url":"https://api.github.com/repos/whatwg/html/milestones{/number}","notifications_url":"https://api.github.com/repos/whatwg/html/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whatwg/html/labels{/name}","releases_url":"https://api.github.com/repos/whatwg/html/releases{/id}","deployments_url":"https://api.github.com/repos/whatwg/html/deployments","created_at":"2013-08-08T06:26:07Z","updated_at":"2018-02-02T22:58:23Z","pushed_at":"2018-02-02T17:58:37Z","git_url":"git://github.com/whatwg/html.git","ssh_url":"git@github.com:whatwg/html.git","clone_url":"https://github.com/whatwg/html.git","svn_url":"https://github.com/whatwg/html","homepage":"https://html.spec.whatwg.org/multipage/","size":186691,"stargazers_count":1664,"watchers_count":1664,"language":"HTML","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":567,"mirror_url":null,"archived":false,"open_issues_count":760,"license":{"key":"cc-by-4.0","name":"Creative Commons Attribution 4.0","spdx_id":"CC-BY-4.0","url":"https://api.github.com/licenses/cc-by-4.0"},"forks":567,"open_issues":760,"watchers":1664,"default_branch":"master"}},"base":{"label":"whatwg:master","ref":"master","sha":"2102913b313078cd8eeac7e81e6a8756cbd3e773","user":{"login":"whatwg","id":2226336,"avatar_url":"https://avatars1.githubusercontent.com/u/2226336?v=4","gravatar_id":"","url":"https://api.github.com/users/whatwg","html_url":"https://github.com/whatwg","followers_url":"https://api.github.com/users/whatwg/followers","following_url":"https://api.github.com/users/whatwg/following{/other_user}","gists_url":"https://api.github.com/users/whatwg/gists{/gist_id}","starred_url":"https://api.github.com/users/whatwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatwg/subscriptions","organizations_url":"https://api.github.com/users/whatwg/orgs","repos_url":"https://api.github.com/users/whatwg/repos","events_url":"https://api.github.com/users/whatwg/events{/privacy}","received_events_url":"https://api.github.com/users/whatwg/received_events","type":"Organization","site_admin":false},"repo":{"id":11969507,"name":"html","full_name":"whatwg/html","owner":{"login":"whatwg","id":2226336,"avatar_url":"https://avatars1.githubusercontent.com/u/2226336?v=4","gravatar_id":"","url":"https://api.github.com/users/whatwg","html_url":"https://github.com/whatwg","followers_url":"https://api.github.com/users/whatwg/followers","following_url":"https://api.github.com/users/whatwg/following{/other_user}","gists_url":"https://api.github.com/users/whatwg/gists{/gist_id}","starred_url":"https://api.github.com/users/whatwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatwg/subscriptions","organizations_url":"https://api.github.com/users/whatwg/orgs","repos_url":"https://api.github.com/users/whatwg/repos","events_url":"https://api.github.com/users/whatwg/events{/privacy}","received_events_url":"https://api.github.com/users/whatwg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/whatwg/html","description":"HTML Standard","fork":false,"url":"https://api.github.com/repos/whatwg/html","forks_url":"https://api.github.com/repos/whatwg/html/forks","keys_url":"https://api.github.com/repos/whatwg/html/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whatwg/html/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whatwg/html/teams","hooks_url":"https://api.github.com/repos/whatwg/html/hooks","issue_events_url":"https://api.github.com/repos/whatwg/html/issues/events{/number}","events_url":"https://api.github.com/repos/whatwg/html/events","assignees_url":"https://api.github.com/repos/whatwg/html/assignees{/user}","branches_url":"https://api.github.com/repos/whatwg/html/branches{/branch}","tags_url":"https://api.github.com/repos/whatwg/html/tags","blobs_url":"https://api.github.com/repos/whatwg/html/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whatwg/html/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whatwg/html/git/refs{/sha}","trees_url":"https://api.github.com/repos/whatwg/html/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whatwg/html/statuses/{sha}","languages_url":"https://api.github.com/repos/whatwg/html/languages","stargazers_url":"https://api.github.com/repos/whatwg/html/stargazers","contributors_url":"https://api.github.com/repos/whatwg/html/contributors","subscribers_url":"https://api.github.com/repos/whatwg/html/subscribers","subscription_url":"https://api.github.com/repos/whatwg/html/subscription","commits_url":"https://api.github.com/repos/whatwg/html/commits{/sha}","git_commits_url":"https://api.github.com/repos/whatwg/html/git/commits{/sha}","comments_url":"https://api.github.com/repos/whatwg/html/comments{/number}","issue_comment_url":"https://api.github.com/repos/whatwg/html/issues/comments{/number}","contents_url":"https://api.github.com/repos/whatwg/html/contents/{+path}","compare_url":"https://api.github.com/repos/whatwg/html/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whatwg/html/merges","archive_url":"https://api.github.com/repos/whatwg/html/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whatwg/html/downloads","issues_url":"https://api.github.com/repos/whatwg/html/issues{/number}","pulls_url":"https://api.github.com/repos/whatwg/html/pulls{/number}","milestones_url":"https://api.github.com/repos/whatwg/html/milestones{/number}","notifications_url":"https://api.github.com/repos/whatwg/html/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whatwg/html/labels{/name}","releases_url":"https://api.github.com/repos/whatwg/html/releases{/id}","deployments_url":"https://api.github.com/repos/whatwg/html/deployments","created_at":"2013-08-08T06:26:07Z","updated_at":"2018-02-02T22:58:23Z","pushed_at":"2018-02-02T17:58:37Z","git_url":"git://github.com/whatwg/html.git","ssh_url":"git@github.com:whatwg/html.git","clone_url":"https://github.com/whatwg/html.git","svn_url":"https://github.com/whatwg/html","homepage":"https://html.spec.whatwg.org/multipage/","size":186691,"stargazers_count":1664,"watchers_count":1664,"language":"HTML","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":567,"mirror_url":null,"archived":false,"open_issues_count":760,"license":{"key":"cc-by-4.0","name":"Creative Commons Attribution 4.0","spdx_id":"CC-BY-4.0","url":"https://api.github.com/licenses/cc-by-4.0"},"forks":567,"open_issues":760,"watchers":1664,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/whatwg/html/pulls/3444"},"html":{"href":"https://github.com/whatwg/html/pull/3444"},"issue":{"href":"https://api.github.com/repos/whatwg/html/issues/3444"},"comments":{"href":"https://api.github.com/repos/whatwg/html/issues/3444/comments"},"review_comments":{"href":"https://api.github.com/repos/whatwg/html/pulls/3444/comments"},"review_comment":{"href":"https://api.github.com/repos/whatwg/html/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/whatwg/html/pulls/3444/commits"},"statuses":{"href":"https://api.github.com/repos/whatwg/html/statuses/e693cb185c009dc87f72d9827da224967a568409"}},"author_association":"OWNER"}}
{"actor":{"display_login":"annevk"}}