{"action":"created","comment":{"url":"https://api.github.com/repos/skatejs/skatejs/pulls/comments/95090480","pull_request_review_id":15634724,"id":95090480,"diff_hunk":"@@ -1,48 +1,49 @@\n-import { name as $name } from '../util/symbols';\n import Component from './component';\n import uniqueId from '../util/unique-id';\n import root from 'window-or-global';\n \n export default function (...args) {\n-  const { customElements } = root;\n+  const { customElements HTMLElement } = root;\n   let [ name, Ctor ] = args;\n \n   if (!customElements) {\n     throw new Error('Skate requires native custom element support or a polyfill.');\n   }\n \n-  // Support passing an anonymous definition.\n-  if (args.length === 1) {\n-    // We are checking string for now, but once we remove the ability to pass\n-    // an object literal, we can change this to check \"function\" and invert the\n-    // blocks of logic.\n-    if (typeof name === 'string') {\n-      throw new Error('When passing only one argument to define(), it must be a custom element constructor.');\n-    } else {\n-      Ctor = name;\n-      name = uniqueId();\n-    }\n+  // DEPRECATED remove when removing the \"name\" argument.\n+  if (DEBUG && args.legnth === 2) {\n+    console.warn('The \"name\" argument to define() is deprecated. Please define a `static is` property on the constructor instead.');\n   }\n \n-  // Ensure there's no conflicts.\n-  if (customElements.get(name)) {\n-    name = uniqueId(name);\n+  // DEPRECATED remove when removing the \"name\" argument.\n+  if (args.length === 1) {\n+    Ctor = name;\n+    name = null;\n   }\n \n-  // DEPRECATED\n-  //\n-  // Object literals.\n+  // DEPRECATED Object literals.\n   if (typeof Ctor === 'object') {\n     Ctor = Component.extend(Ctor);\n   }\n \n-  // This allows us to check this before instantiating the custom element to\n-  // find its name from the constructor in the vdom module, thus improving\n-  // performance but still falling back to a robust method.\n-  Ctor[$name] = name;\n+  // Ensure a custom element is passed.\n+  if (!(Ctor.prototype instanceof HTMLElement)) {\n+    throw new Error('You must provide a constructor that extends HTMLElement to define().');\n+  }\n+\n+  // \"is\" takes precendence over \"name\" and falls back to a unique id\n+  let is = Ctor.is || name || uniqueId();","path":"src/api/define.js","position":58,"original_position":58,"commit_id":"a10e65dfdc1ea4f8809c6aaf10d38b34ac22c95d","original_commit_id":"95939c0ec84919615f6e0aea582d275ffa43860a","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},"body":"That is left over from uncommitted changes. TY!","created_at":"2017-01-08T22:26:47Z","updated_at":"2017-01-08T22:26:47Z","html_url":"https://github.com/skatejs/skatejs/pull/1005#discussion_r95090480","pull_request_url":"https://api.github.com/repos/skatejs/skatejs/pulls/1005","_links":{"self":{"href":"https://api.github.com/repos/skatejs/skatejs/pulls/comments/95090480"},"html":{"href":"https://github.com/skatejs/skatejs/pull/1005#discussion_r95090480"},"pull_request":{"href":"https://api.github.com/repos/skatejs/skatejs/pulls/1005"}}},"pull_request":{"url":"https://api.github.com/repos/skatejs/skatejs/pulls/1005","id":100585828,"html_url":"https://github.com/skatejs/skatejs/pull/1005","diff_url":"https://github.com/skatejs/skatejs/pull/1005.diff","patch_url":"https://github.com/skatejs/skatejs/pull/1005.patch","issue_url":"https://api.github.com/repos/skatejs/skatejs/issues/1005","number":1005,"state":"open","locked":false,"title":"feat(define): Add support for a static \"is\" property.","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},"body":"implements #1004\r\n\r\nMost of the test file changes were removing deprecated `define()` calls.","created_at":"2017-01-07T23:23:17Z","updated_at":"2017-01-08T22:26:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a4fb0af9b5f48317003f9e691ab6b9d4f1b4084","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/skatejs/skatejs/pulls/1005/commits","review_comments_url":"https://api.github.com/repos/skatejs/skatejs/pulls/1005/comments","review_comment_url":"https://api.github.com/repos/skatejs/skatejs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/skatejs/skatejs/issues/1005/comments","statuses_url":"https://api.github.com/repos/skatejs/skatejs/statuses/a10e65dfdc1ea4f8809c6aaf10d38b34ac22c95d","head":{"label":"skatejs:1004","ref":"1004","sha":"a10e65dfdc1ea4f8809c6aaf10d38b34ac22c95d","user":{"login":"skatejs","id":7636121,"avatar_url":"https://avatars.githubusercontent.com/u/7636121?v=3","gravatar_id":"","url":"https://api.github.com/users/skatejs","html_url":"https://github.com/skatejs","followers_url":"https://api.github.com/users/skatejs/followers","following_url":"https://api.github.com/users/skatejs/following{/other_user}","gists_url":"https://api.github.com/users/skatejs/gists{/gist_id}","starred_url":"https://api.github.com/users/skatejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skatejs/subscriptions","organizations_url":"https://api.github.com/users/skatejs/orgs","repos_url":"https://api.github.com/users/skatejs/repos","events_url":"https://api.github.com/users/skatejs/events{/privacy}","received_events_url":"https://api.github.com/users/skatejs/received_events","type":"Organization","site_admin":false},"repo":{"id":16425042,"name":"skatejs","full_name":"skatejs/skatejs","owner":{"login":"skatejs","id":7636121,"avatar_url":"https://avatars.githubusercontent.com/u/7636121?v=3","gravatar_id":"","url":"https://api.github.com/users/skatejs","html_url":"https://github.com/skatejs","followers_url":"https://api.github.com/users/skatejs/followers","following_url":"https://api.github.com/users/skatejs/following{/other_user}","gists_url":"https://api.github.com/users/skatejs/gists{/gist_id}","starred_url":"https://api.github.com/users/skatejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skatejs/subscriptions","organizations_url":"https://api.github.com/users/skatejs/orgs","repos_url":"https://api.github.com/users/skatejs/repos","events_url":"https://api.github.com/users/skatejs/events{/privacy}","received_events_url":"https://api.github.com/users/skatejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/skatejs/skatejs","description":"SkateJS is a web component library designed to give you an augmentation of the web component specs focusing on a functional rendering pipeline, clean property / attribute semantics and a small footprint.","fork":false,"url":"https://api.github.com/repos/skatejs/skatejs","forks_url":"https://api.github.com/repos/skatejs/skatejs/forks","keys_url":"https://api.github.com/repos/skatejs/skatejs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skatejs/skatejs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skatejs/skatejs/teams","hooks_url":"https://api.github.com/repos/skatejs/skatejs/hooks","issue_events_url":"https://api.github.com/repos/skatejs/skatejs/issues/events{/number}","events_url":"https://api.github.com/repos/skatejs/skatejs/events","assignees_url":"https://api.github.com/repos/skatejs/skatejs/assignees{/user}","branches_url":"https://api.github.com/repos/skatejs/skatejs/branches{/branch}","tags_url":"https://api.github.com/repos/skatejs/skatejs/tags","blobs_url":"https://api.github.com/repos/skatejs/skatejs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skatejs/skatejs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skatejs/skatejs/git/refs{/sha}","trees_url":"https://api.github.com/repos/skatejs/skatejs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skatejs/skatejs/statuses/{sha}","languages_url":"https://api.github.com/repos/skatejs/skatejs/languages","stargazers_url":"https://api.github.com/repos/skatejs/skatejs/stargazers","contributors_url":"https://api.github.com/repos/skatejs/skatejs/contributors","subscribers_url":"https://api.github.com/repos/skatejs/skatejs/subscribers","subscription_url":"https://api.github.com/repos/skatejs/skatejs/subscription","commits_url":"https://api.github.com/repos/skatejs/skatejs/commits{/sha}","git_commits_url":"https://api.github.com/repos/skatejs/skatejs/git/commits{/sha}","comments_url":"https://api.github.com/repos/skatejs/skatejs/comments{/number}","issue_comment_url":"https://api.github.com/repos/skatejs/skatejs/issues/comments{/number}","contents_url":"https://api.github.com/repos/skatejs/skatejs/contents/{+path}","compare_url":"https://api.github.com/repos/skatejs/skatejs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skatejs/skatejs/merges","archive_url":"https://api.github.com/repos/skatejs/skatejs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skatejs/skatejs/downloads","issues_url":"https://api.github.com/repos/skatejs/skatejs/issues{/number}","pulls_url":"https://api.github.com/repos/skatejs/skatejs/pulls{/number}","milestones_url":"https://api.github.com/repos/skatejs/skatejs/milestones{/number}","notifications_url":"https://api.github.com/repos/skatejs/skatejs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skatejs/skatejs/labels{/name}","releases_url":"https://api.github.com/repos/skatejs/skatejs/releases{/id}","deployments_url":"https://api.github.com/repos/skatejs/skatejs/deployments","created_at":"2014-02-01T00:32:47Z","updated_at":"2017-01-08T22:11:05Z","pushed_at":"2017-01-08T22:25:52Z","git_url":"git://github.com/skatejs/skatejs.git","ssh_url":"git@github.com:skatejs/skatejs.git","clone_url":"https://github.com/skatejs/skatejs.git","svn_url":"https://github.com/skatejs/skatejs","homepage":"https://skatejs.gitbooks.io/skatejs/content","size":5798,"stargazers_count":1868,"watchers_count":1868,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":77,"mirror_url":null,"open_issues_count":47,"forks":77,"open_issues":47,"watchers":1868,"default_branch":"master"}},"base":{"label":"skatejs:master","ref":"master","sha":"7534ebd846fe7831e39aeaed30bcf392f63de817","user":{"login":"skatejs","id":7636121,"avatar_url":"https://avatars.githubusercontent.com/u/7636121?v=3","gravatar_id":"","url":"https://api.github.com/users/skatejs","html_url":"https://github.com/skatejs","followers_url":"https://api.github.com/users/skatejs/followers","following_url":"https://api.github.com/users/skatejs/following{/other_user}","gists_url":"https://api.github.com/users/skatejs/gists{/gist_id}","starred_url":"https://api.github.com/users/skatejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skatejs/subscriptions","organizations_url":"https://api.github.com/users/skatejs/orgs","repos_url":"https://api.github.com/users/skatejs/repos","events_url":"https://api.github.com/users/skatejs/events{/privacy}","received_events_url":"https://api.github.com/users/skatejs/received_events","type":"Organization","site_admin":false},"repo":{"id":16425042,"name":"skatejs","full_name":"skatejs/skatejs","owner":{"login":"skatejs","id":7636121,"avatar_url":"https://avatars.githubusercontent.com/u/7636121?v=3","gravatar_id":"","url":"https://api.github.com/users/skatejs","html_url":"https://github.com/skatejs","followers_url":"https://api.github.com/users/skatejs/followers","following_url":"https://api.github.com/users/skatejs/following{/other_user}","gists_url":"https://api.github.com/users/skatejs/gists{/gist_id}","starred_url":"https://api.github.com/users/skatejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skatejs/subscriptions","organizations_url":"https://api.github.com/users/skatejs/orgs","repos_url":"https://api.github.com/users/skatejs/repos","events_url":"https://api.github.com/users/skatejs/events{/privacy}","received_events_url":"https://api.github.com/users/skatejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/skatejs/skatejs","description":"SkateJS is a web component library designed to give you an augmentation of the web component specs focusing on a functional rendering pipeline, clean property / attribute semantics and a small footprint.","fork":false,"url":"https://api.github.com/repos/skatejs/skatejs","forks_url":"https://api.github.com/repos/skatejs/skatejs/forks","keys_url":"https://api.github.com/repos/skatejs/skatejs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skatejs/skatejs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skatejs/skatejs/teams","hooks_url":"https://api.github.com/repos/skatejs/skatejs/hooks","issue_events_url":"https://api.github.com/repos/skatejs/skatejs/issues/events{/number}","events_url":"https://api.github.com/repos/skatejs/skatejs/events","assignees_url":"https://api.github.com/repos/skatejs/skatejs/assignees{/user}","branches_url":"https://api.github.com/repos/skatejs/skatejs/branches{/branch}","tags_url":"https://api.github.com/repos/skatejs/skatejs/tags","blobs_url":"https://api.github.com/repos/skatejs/skatejs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skatejs/skatejs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skatejs/skatejs/git/refs{/sha}","trees_url":"https://api.github.com/repos/skatejs/skatejs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skatejs/skatejs/statuses/{sha}","languages_url":"https://api.github.com/repos/skatejs/skatejs/languages","stargazers_url":"https://api.github.com/repos/skatejs/skatejs/stargazers","contributors_url":"https://api.github.com/repos/skatejs/skatejs/contributors","subscribers_url":"https://api.github.com/repos/skatejs/skatejs/subscribers","subscription_url":"https://api.github.com/repos/skatejs/skatejs/subscription","commits_url":"https://api.github.com/repos/skatejs/skatejs/commits{/sha}","git_commits_url":"https://api.github.com/repos/skatejs/skatejs/git/commits{/sha}","comments_url":"https://api.github.com/repos/skatejs/skatejs/comments{/number}","issue_comment_url":"https://api.github.com/repos/skatejs/skatejs/issues/comments{/number}","contents_url":"https://api.github.com/repos/skatejs/skatejs/contents/{+path}","compare_url":"https://api.github.com/repos/skatejs/skatejs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skatejs/skatejs/merges","archive_url":"https://api.github.com/repos/skatejs/skatejs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skatejs/skatejs/downloads","issues_url":"https://api.github.com/repos/skatejs/skatejs/issues{/number}","pulls_url":"https://api.github.com/repos/skatejs/skatejs/pulls{/number}","milestones_url":"https://api.github.com/repos/skatejs/skatejs/milestones{/number}","notifications_url":"https://api.github.com/repos/skatejs/skatejs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skatejs/skatejs/labels{/name}","releases_url":"https://api.github.com/repos/skatejs/skatejs/releases{/id}","deployments_url":"https://api.github.com/repos/skatejs/skatejs/deployments","created_at":"2014-02-01T00:32:47Z","updated_at":"2017-01-08T22:11:05Z","pushed_at":"2017-01-08T22:25:52Z","git_url":"git://github.com/skatejs/skatejs.git","ssh_url":"git@github.com:skatejs/skatejs.git","clone_url":"https://github.com/skatejs/skatejs.git","svn_url":"https://github.com/skatejs/skatejs","homepage":"https://skatejs.gitbooks.io/skatejs/content","size":5798,"stargazers_count":1868,"watchers_count":1868,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":77,"mirror_url":null,"open_issues_count":47,"forks":77,"open_issues":47,"watchers":1868,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/skatejs/skatejs/pulls/1005"},"html":{"href":"https://github.com/skatejs/skatejs/pull/1005"},"issue":{"href":"https://api.github.com/repos/skatejs/skatejs/issues/1005"},"comments":{"href":"https://api.github.com/repos/skatejs/skatejs/issues/1005/comments"},"review_comments":{"href":"https://api.github.com/repos/skatejs/skatejs/pulls/1005/comments"},"review_comment":{"href":"https://api.github.com/repos/skatejs/skatejs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/skatejs/skatejs/pulls/1005/commits"},"statuses":{"href":"https://api.github.com/repos/skatejs/skatejs/statuses/a10e65dfdc1ea4f8809c6aaf10d38b34ac22c95d"}}}}
{"actor":{"display_login":"treshugart"}}