{"action":"created","comment":{"url":"https://api.github.com/repos/servo/servo/pulls/comments/123836943","pull_request_review_id":46082765,"id":123836943,"diff_hunk":"@@ -106,11 +109,42 @@ fn create_svg_element(name: QualName,\n     }\n }\n \n+// https://dom.spec.whatwg.org/#concept-create-element\n+#[allow(unsafe_code)]\n fn create_html_element(name: QualName,\n                        prefix: Option<Prefix>,\n                        document: &Document,\n                        creator: ElementCreator)\n                        -> Root<Element> {\n+    assert!(name.ns == ns!(html));\n+\n+    // Step 4\n+    let definition = document.lookup_custom_element_definition(name.local.clone(), None);\n+\n+    if let Some(definition) = definition {\n+        // TODO: Handle customized built-in elements. Relies on CE upgrades.\n+        if definition.is_autonomous() {\n+            let local_name = name.local.clone();\n+            return match definition.create_element(document) {\n+                Ok(element) => element,\n+                Err(error) => {\n+                    // Step 6. Recovering from exception.\n+                    let global = document.global();","path":"components/script/dom/create.rs","position":null,"original_position":42,"commit_id":"2be1f01d973dda6c2975e7696a61be29f44bb773","original_commit_id":"549eeb947ad700ec82f535f4e65fbe55b35af1fa","user":{"login":"cbrewster","id":9086315,"avatar_url":"https://avatars2.githubusercontent.com/u/9086315?v=3","gravatar_id":"","url":"https://api.github.com/users/cbrewster","html_url":"https://github.com/cbrewster","followers_url":"https://api.github.com/users/cbrewster/followers","following_url":"https://api.github.com/users/cbrewster/following{/other_user}","gists_url":"https://api.github.com/users/cbrewster/gists{/gist_id}","starred_url":"https://api.github.com/users/cbrewster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbrewster/subscriptions","organizations_url":"https://api.github.com/users/cbrewster/orgs","repos_url":"https://api.github.com/users/cbrewster/repos","events_url":"https://api.github.com/users/cbrewster/events{/privacy}","received_events_url":"https://api.github.com/users/cbrewster/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2017-06-23T20:23:34Z","updated_at":"2017-06-23T20:23:34Z","html_url":"https://github.com/servo/servo/pull/17381#discussion_r123836943","pull_request_url":"https://api.github.com/repos/servo/servo/pulls/17381","_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/comments/123836943"},"html":{"href":"https://github.com/servo/servo/pull/17381#discussion_r123836943"},"pull_request":{"href":"https://api.github.com/repos/servo/servo/pulls/17381"}}},"pull_request":{"url":"https://api.github.com/repos/servo/servo/pulls/17381","id":126143010,"html_url":"https://github.com/servo/servo/pull/17381","diff_url":"https://github.com/servo/servo/pull/17381.diff","patch_url":"https://github.com/servo/servo/pull/17381.patch","issue_url":"https://api.github.com/repos/servo/servo/issues/17381","number":17381,"state":"open","locked":false,"title":"Custom element creation","user":{"login":"cbrewster","id":9086315,"avatar_url":"https://avatars2.githubusercontent.com/u/9086315?v=3","gravatar_id":"","url":"https://api.github.com/users/cbrewster","html_url":"https://github.com/cbrewster","followers_url":"https://api.github.com/users/cbrewster/followers","following_url":"https://api.github.com/users/cbrewster/following{/other_user}","gists_url":"https://api.github.com/users/cbrewster/gists{/gist_id}","starred_url":"https://api.github.com/users/cbrewster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbrewster/subscriptions","organizations_url":"https://api.github.com/users/cbrewster/orgs","repos_url":"https://api.github.com/users/cbrewster/repos","events_url":"https://api.github.com/users/cbrewster/events{/privacy}","received_events_url":"https://api.github.com/users/cbrewster/received_events","type":"User","site_admin":false},"body":"<!-- Please describe your changes on the following line: -->\r\n\r\nThis implements the CE-related steps when creating elements. `is` is now support by `document.createElement` and is stored on `Element`s. Only synchronously created autonomous elements are supported as async element creation and customized built-in elements both require custom element upgrade reactions.\r\n\r\nSpec: https://dom.spec.whatwg.org/#concept-create-element\r\n\r\n---\r\n<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->\r\n- [X] `./mach build -d` does not report any errors\r\n- [X] `./mach test-tidy` does not report any errors\r\n- [X] These changes fix #17191 (github issue number if applicable).\r\n\r\n<!-- Either: -->\r\n- [X] There are tests for these changes OR\r\n- [ ] These changes do not require tests because _____\r\n\r\n<!-- Also, please make sure that \"Allow edits from maintainers\" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->\r\n\r\n<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/servo/servo/17381)\n<!-- Reviewable:end -->\n","created_at":"2017-06-17T04:46:22Z","updated_at":"2017-06-23T20:23:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"008df9220127377899ccb91a870322787ab4a0b0","assignee":{"login":"jdm","id":27658,"avatar_url":"https://avatars2.githubusercontent.com/u/27658?v=3","gravatar_id":"","url":"https://api.github.com/users/jdm","html_url":"https://github.com/jdm","followers_url":"https://api.github.com/users/jdm/followers","following_url":"https://api.github.com/users/jdm/following{/other_user}","gists_url":"https://api.github.com/users/jdm/gists{/gist_id}","starred_url":"https://api.github.com/users/jdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdm/subscriptions","organizations_url":"https://api.github.com/users/jdm/orgs","repos_url":"https://api.github.com/users/jdm/repos","events_url":"https://api.github.com/users/jdm/events{/privacy}","received_events_url":"https://api.github.com/users/jdm/received_events","type":"User","site_admin":false},"assignees":[{"login":"jdm","id":27658,"avatar_url":"https://avatars2.githubusercontent.com/u/27658?v=3","gravatar_id":"","url":"https://api.github.com/users/jdm","html_url":"https://github.com/jdm","followers_url":"https://api.github.com/users/jdm/followers","following_url":"https://api.github.com/users/jdm/following{/other_user}","gists_url":"https://api.github.com/users/jdm/gists{/gist_id}","starred_url":"https://api.github.com/users/jdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdm/subscriptions","organizations_url":"https://api.github.com/users/jdm/orgs","repos_url":"https://api.github.com/users/jdm/repos","events_url":"https://api.github.com/users/jdm/events{/privacy}","received_events_url":"https://api.github.com/users/jdm/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/servo/servo/pulls/17381/commits","review_comments_url":"https://api.github.com/repos/servo/servo/pulls/17381/comments","review_comment_url":"https://api.github.com/repos/servo/servo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/servo/servo/issues/17381/comments","statuses_url":"https://api.github.com/repos/servo/servo/statuses/2be1f01d973dda6c2975e7696a61be29f44bb773","head":{"label":"cbrewster:custom_element_creation","ref":"custom_element_creation","sha":"2be1f01d973dda6c2975e7696a61be29f44bb773","user":{"login":"cbrewster","id":9086315,"avatar_url":"https://avatars2.githubusercontent.com/u/9086315?v=3","gravatar_id":"","url":"https://api.github.com/users/cbrewster","html_url":"https://github.com/cbrewster","followers_url":"https://api.github.com/users/cbrewster/followers","following_url":"https://api.github.com/users/cbrewster/following{/other_user}","gists_url":"https://api.github.com/users/cbrewster/gists{/gist_id}","starred_url":"https://api.github.com/users/cbrewster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbrewster/subscriptions","organizations_url":"https://api.github.com/users/cbrewster/orgs","repos_url":"https://api.github.com/users/cbrewster/repos","events_url":"https://api.github.com/users/cbrewster/events{/privacy}","received_events_url":"https://api.github.com/users/cbrewster/received_events","type":"User","site_admin":false},"repo":{"id":54279218,"name":"servo","full_name":"cbrewster/servo","owner":{"login":"cbrewster","id":9086315,"avatar_url":"https://avatars2.githubusercontent.com/u/9086315?v=3","gravatar_id":"","url":"https://api.github.com/users/cbrewster","html_url":"https://github.com/cbrewster","followers_url":"https://api.github.com/users/cbrewster/followers","following_url":"https://api.github.com/users/cbrewster/following{/other_user}","gists_url":"https://api.github.com/users/cbrewster/gists{/gist_id}","starred_url":"https://api.github.com/users/cbrewster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbrewster/subscriptions","organizations_url":"https://api.github.com/users/cbrewster/orgs","repos_url":"https://api.github.com/users/cbrewster/repos","events_url":"https://api.github.com/users/cbrewster/events{/privacy}","received_events_url":"https://api.github.com/users/cbrewster/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cbrewster/servo","description":"The Servo Browser Engine","fork":true,"url":"https://api.github.com/repos/cbrewster/servo","forks_url":"https://api.github.com/repos/cbrewster/servo/forks","keys_url":"https://api.github.com/repos/cbrewster/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cbrewster/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cbrewster/servo/teams","hooks_url":"https://api.github.com/repos/cbrewster/servo/hooks","issue_events_url":"https://api.github.com/repos/cbrewster/servo/issues/events{/number}","events_url":"https://api.github.com/repos/cbrewster/servo/events","assignees_url":"https://api.github.com/repos/cbrewster/servo/assignees{/user}","branches_url":"https://api.github.com/repos/cbrewster/servo/branches{/branch}","tags_url":"https://api.github.com/repos/cbrewster/servo/tags","blobs_url":"https://api.github.com/repos/cbrewster/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cbrewster/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cbrewster/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/cbrewster/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cbrewster/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/cbrewster/servo/languages","stargazers_url":"https://api.github.com/repos/cbrewster/servo/stargazers","contributors_url":"https://api.github.com/repos/cbrewster/servo/contributors","subscribers_url":"https://api.github.com/repos/cbrewster/servo/subscribers","subscription_url":"https://api.github.com/repos/cbrewster/servo/subscription","commits_url":"https://api.github.com/repos/cbrewster/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/cbrewster/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/cbrewster/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/cbrewster/servo/issues/comments{/number}","contents_url":"https://api.github.com/repos/cbrewster/servo/contents/{+path}","compare_url":"https://api.github.com/repos/cbrewster/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cbrewster/servo/merges","archive_url":"https://api.github.com/repos/cbrewster/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cbrewster/servo/downloads","issues_url":"https://api.github.com/repos/cbrewster/servo/issues{/number}","pulls_url":"https://api.github.com/repos/cbrewster/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/cbrewster/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/cbrewster/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cbrewster/servo/labels{/name}","releases_url":"https://api.github.com/repos/cbrewster/servo/releases{/id}","deployments_url":"https://api.github.com/repos/cbrewster/servo/deployments","created_at":"2016-03-19T17:47:45Z","updated_at":"2017-05-02T16:55:44Z","pushed_at":"2017-06-23T20:22:51Z","git_url":"git://github.com/cbrewster/servo.git","ssh_url":"git@github.com:cbrewster/servo.git","clone_url":"https://github.com/cbrewster/servo.git","svn_url":"https://github.com/cbrewster/servo","homepage":"https://servo.org/","size":283162,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"servo:master","ref":"master","sha":"7e493529f0eca00b92274a047f843b990e6bd1a9","user":{"login":"servo","id":2566135,"avatar_url":"https://avatars2.githubusercontent.com/u/2566135?v=3","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"repo":{"id":3390243,"name":"servo","full_name":"servo/servo","owner":{"login":"servo","id":2566135,"avatar_url":"https://avatars2.githubusercontent.com/u/2566135?v=3","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/servo/servo","description":"The Servo Browser Engine","fork":false,"url":"https://api.github.com/repos/servo/servo","forks_url":"https://api.github.com/repos/servo/servo/forks","keys_url":"https://api.github.com/repos/servo/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/servo/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/servo/servo/teams","hooks_url":"https://api.github.com/repos/servo/servo/hooks","issue_events_url":"https://api.github.com/repos/servo/servo/issues/events{/number}","events_url":"https://api.github.com/repos/servo/servo/events","assignees_url":"https://api.github.com/repos/servo/servo/assignees{/user}","branches_url":"https://api.github.com/repos/servo/servo/branches{/branch}","tags_url":"https://api.github.com/repos/servo/servo/tags","blobs_url":"https://api.github.com/repos/servo/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/servo/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/servo/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/servo/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/servo/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/servo/servo/languages","stargazers_url":"https://api.github.com/repos/servo/servo/stargazers","contributors_url":"https://api.github.com/repos/servo/servo/contributors","subscribers_url":"https://api.github.com/repos/servo/servo/subscribers","subscription_url":"https://api.github.com/repos/servo/servo/subscription","commits_url":"https://api.github.com/repos/servo/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/servo/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/servo/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/servo/servo/issues/comments{/number}","contents_url":"https://api.github.com/repos/servo/servo/contents/{+path}","compare_url":"https://api.github.com/repos/servo/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/servo/servo/merges","archive_url":"https://api.github.com/repos/servo/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/servo/servo/downloads","issues_url":"https://api.github.com/repos/servo/servo/issues{/number}","pulls_url":"https://api.github.com/repos/servo/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/servo/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/servo/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/servo/servo/labels{/name}","releases_url":"https://api.github.com/repos/servo/servo/releases{/id}","deployments_url":"https://api.github.com/repos/servo/servo/deployments","created_at":"2012-02-08T19:07:25Z","updated_at":"2017-06-23T17:29:12Z","pushed_at":"2017-06-23T20:22:55Z","git_url":"git://github.com/servo/servo.git","ssh_url":"git@github.com:servo/servo.git","clone_url":"https://github.com/servo/servo.git","svn_url":"https://github.com/servo/servo","homepage":"https://servo.org/","size":357443,"stargazers_count":9563,"watchers_count":9563,"language":null,"has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1647,"mirror_url":null,"open_issues_count":2234,"forks":1647,"open_issues":2234,"watchers":9563,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/17381"},"html":{"href":"https://github.com/servo/servo/pull/17381"},"issue":{"href":"https://api.github.com/repos/servo/servo/issues/17381"},"comments":{"href":"https://api.github.com/repos/servo/servo/issues/17381/comments"},"review_comments":{"href":"https://api.github.com/repos/servo/servo/pulls/17381/comments"},"review_comment":{"href":"https://api.github.com/repos/servo/servo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/servo/servo/pulls/17381/commits"},"statuses":{"href":"https://api.github.com/repos/servo/servo/statuses/2be1f01d973dda6c2975e7696a61be29f44bb773"}}}}
{"actor":{"display_login":"cbrewster"}}