{"action":"created","comment":{"url":"https://api.github.com/repos/node-xmpp/ltx/pulls/comments/37978688","id":37978688,"diff_hunk":"@@ -1,16 +1,23 @@\n 'use strict';\n \n var parse = require('./parse')\n+var element = require('./element')\n+var Element = element.Element\n+var DOMElement = require('./dom-element')\n \n /**\n  * The only (relevant) data structure\n  */\n-exports.Element = require('./dom-element')\n+exports.Element = DOMElement","path":"lib/index.js","position":12,"original_position":12,"commit_id":"d6e51fac64e861e210db81141ca8136f335f30d9","original_commit_id":"d6e51fac64e861e210db81141ca8136f335f30d9","user":{"login":"sonnyp","id":19673,"avatar_url":"https://avatars.githubusercontent.com/u/19673?v=3","gravatar_id":"","url":"https://api.github.com/users/sonnyp","html_url":"https://github.com/sonnyp","followers_url":"https://api.github.com/users/sonnyp/followers","following_url":"https://api.github.com/users/sonnyp/following{/other_user}","gists_url":"https://api.github.com/users/sonnyp/gists{/gist_id}","starred_url":"https://api.github.com/users/sonnyp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonnyp/subscriptions","organizations_url":"https://api.github.com/users/sonnyp/orgs","repos_url":"https://api.github.com/users/sonnyp/repos","events_url":"https://api.github.com/users/sonnyp/events{/privacy}","received_events_url":"https://api.github.com/users/sonnyp/received_events","type":"User","site_admin":false},"body":"I'm not even sure DOM API should be in ltx","created_at":"2015-08-26T13:09:33Z","updated_at":"2015-08-26T13:09:33Z","html_url":"https://github.com/node-xmpp/ltx/pull/60#discussion_r37978688","pull_request_url":"https://api.github.com/repos/node-xmpp/ltx/pulls/60","_links":{"self":{"href":"https://api.github.com/repos/node-xmpp/ltx/pulls/comments/37978688"},"html":{"href":"https://github.com/node-xmpp/ltx/pull/60#discussion_r37978688"},"pull_request":{"href":"https://api.github.com/repos/node-xmpp/ltx/pulls/60"}}},"pull_request":{"url":"https://api.github.com/repos/node-xmpp/ltx/pulls/60","id":43311851,"html_url":"https://github.com/node-xmpp/ltx/pull/60","diff_url":"https://github.com/node-xmpp/ltx/pull/60.diff","patch_url":"https://github.com/node-xmpp/ltx/pull/60.patch","issue_url":"https://api.github.com/repos/node-xmpp/ltx/issues/60","number":60,"state":"open","locked":false,"title":"createElement","user":{"login":"sonnyp","id":19673,"avatar_url":"https://avatars.githubusercontent.com/u/19673?v=3","gravatar_id":"","url":"https://api.github.com/users/sonnyp","html_url":"https://github.com/sonnyp","followers_url":"https://api.github.com/users/sonnyp/followers","following_url":"https://api.github.com/users/sonnyp/following{/other_user}","gists_url":"https://api.github.com/users/sonnyp/gists{/gist_id}","starred_url":"https://api.github.com/users/sonnyp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonnyp/subscriptions","organizations_url":"https://api.github.com/users/sonnyp/orgs","repos_url":"https://api.github.com/users/sonnyp/repos","events_url":"https://api.github.com/users/sonnyp/events{/privacy}","received_events_url":"https://api.github.com/users/sonnyp/received_events","type":"User","site_admin":false},"body":"This allows usage of  [JSX](https://facebook.github.io/jsx/) with ltx.\r\n\r\n~~E4X~~ LTX\r\n\r\n```javascript\r\n'use strict'\r\nimport ltx from 'ltx'\r\nconst stanza =\r\n  <message from=\"foo@bar\" to=\"bar@foo\" type=\"chat\">\r\n  \t<body>Hello there</body>\r\n  </message>\r\n```\r\n\r\nrun this through\r\n```babel --jsx-pragma=ltx.createElement``` \r\n\r\nwill output\r\n\r\n```javascript\r\n'use strict';\r\n\r\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\r\n\r\nvar _ltx = require('ltx');\r\n\r\nvar _ltx2 = _interopRequireDefault(_ltx);\r\n\r\nvar stanza = _ltx2['default'].createElement(\r\n  'message',\r\n  { from: 'foo@bar', to: 'bar@foo', type: 'chat' },\r\n  _ltx2['default'].createElement(\r\n    'body',\r\n    null,\r\n    'Hello there'\r\n  )\r\n);\r\n```\r\nTODO:\r\n* Include an example/how-to\r\n* Add Component/Class support ?","created_at":"2015-08-25T17:12:35Z","updated_at":"2015-08-26T13:09:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5793c9c40f1f836dae1d29bec3aa629523455f81","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/node-xmpp/ltx/pulls/60/commits","review_comments_url":"https://api.github.com/repos/node-xmpp/ltx/pulls/60/comments","review_comment_url":"https://api.github.com/repos/node-xmpp/ltx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/node-xmpp/ltx/issues/60/comments","statuses_url":"https://api.github.com/repos/node-xmpp/ltx/statuses/d6e51fac64e861e210db81141ca8136f335f30d9","head":{"label":"node-xmpp:jsx","ref":"jsx","sha":"d6e51fac64e861e210db81141ca8136f335f30d9","user":{"login":"node-xmpp","id":5985248,"avatar_url":"https://avatars.githubusercontent.com/u/5985248?v=3","gravatar_id":"","url":"https://api.github.com/users/node-xmpp","html_url":"https://github.com/node-xmpp","followers_url":"https://api.github.com/users/node-xmpp/followers","following_url":"https://api.github.com/users/node-xmpp/following{/other_user}","gists_url":"https://api.github.com/users/node-xmpp/gists{/gist_id}","starred_url":"https://api.github.com/users/node-xmpp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/node-xmpp/subscriptions","organizations_url":"https://api.github.com/users/node-xmpp/orgs","repos_url":"https://api.github.com/users/node-xmpp/repos","events_url":"https://api.github.com/users/node-xmpp/events{/privacy}","received_events_url":"https://api.github.com/users/node-xmpp/received_events","type":"Organization","site_admin":false},"repo":{"id":1098770,"name":"ltx","full_name":"node-xmpp/ltx","owner":{"login":"node-xmpp","id":5985248,"avatar_url":"https://avatars.githubusercontent.com/u/5985248?v=3","gravatar_id":"","url":"https://api.github.com/users/node-xmpp","html_url":"https://github.com/node-xmpp","followers_url":"https://api.github.com/users/node-xmpp/followers","following_url":"https://api.github.com/users/node-xmpp/following{/other_user}","gists_url":"https://api.github.com/users/node-xmpp/gists{/gist_id}","starred_url":"https://api.github.com/users/node-xmpp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/node-xmpp/subscriptions","organizations_url":"https://api.github.com/users/node-xmpp/orgs","repos_url":"https://api.github.com/users/node-xmpp/repos","events_url":"https://api.github.com/users/node-xmpp/events{/privacy}","received_events_url":"https://api.github.com/users/node-xmpp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/node-xmpp/ltx","description":"<xml for=\"node.js","fork":false,"url":"https://api.github.com/repos/node-xmpp/ltx","forks_url":"https://api.github.com/repos/node-xmpp/ltx/forks","keys_url":"https://api.github.com/repos/node-xmpp/ltx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/node-xmpp/ltx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/node-xmpp/ltx/teams","hooks_url":"https://api.github.com/repos/node-xmpp/ltx/hooks","issue_events_url":"https://api.github.com/repos/node-xmpp/ltx/issues/events{/number}","events_url":"https://api.github.com/repos/node-xmpp/ltx/events","assignees_url":"https://api.github.com/repos/node-xmpp/ltx/assignees{/user}","branches_url":"https://api.github.com/repos/node-xmpp/ltx/branches{/branch}","tags_url":"https://api.github.com/repos/node-xmpp/ltx/tags","blobs_url":"https://api.github.com/repos/node-xmpp/ltx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/node-xmpp/ltx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/node-xmpp/ltx/git/refs{/sha}","trees_url":"https://api.github.com/repos/node-xmpp/ltx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/node-xmpp/ltx/statuses/{sha}","languages_url":"https://api.github.com/repos/node-xmpp/ltx/languages","stargazers_url":"https://api.github.com/repos/node-xmpp/ltx/stargazers","contributors_url":"https://api.github.com/repos/node-xmpp/ltx/contributors","subscribers_url":"https://api.github.com/repos/node-xmpp/ltx/subscribers","subscription_url":"https://api.github.com/repos/node-xmpp/ltx/subscription","commits_url":"https://api.github.com/repos/node-xmpp/ltx/commits{/sha}","git_commits_url":"https://api.github.com/repos/node-xmpp/ltx/git/commits{/sha}","comments_url":"https://api.github.com/repos/node-xmpp/ltx/comments{/number}","issue_comment_url":"https://api.github.com/repos/node-xmpp/ltx/issues/comments{/number}","contents_url":"https://api.github.com/repos/node-xmpp/ltx/contents/{+path}","compare_url":"https://api.github.com/repos/node-xmpp/ltx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/node-xmpp/ltx/merges","archive_url":"https://api.github.com/repos/node-xmpp/ltx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/node-xmpp/ltx/downloads","issues_url":"https://api.github.com/repos/node-xmpp/ltx/issues{/number}","pulls_url":"https://api.github.com/repos/node-xmpp/ltx/pulls{/number}","milestones_url":"https://api.github.com/repos/node-xmpp/ltx/milestones{/number}","notifications_url":"https://api.github.com/repos/node-xmpp/ltx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/node-xmpp/ltx/labels{/name}","releases_url":"https://api.github.com/repos/node-xmpp/ltx/releases{/id}","created_at":"2010-11-21T01:13:17Z","updated_at":"2015-06-03T16:46:03Z","pushed_at":"2015-08-26T11:28:48Z","git_url":"git://github.com/node-xmpp/ltx.git","ssh_url":"git@github.com:node-xmpp/ltx.git","clone_url":"https://github.com/node-xmpp/ltx.git","svn_url":"https://github.com/node-xmpp/ltx","homepage":"http://node-xmpp.org","size":961,"stargazers_count":44,"watchers_count":44,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":7,"forks":25,"open_issues":7,"watchers":44,"default_branch":"master"}},"base":{"label":"node-xmpp:master","ref":"master","sha":"09896f4679afcdabfaa3e8430071186cb91eff7c","user":{"login":"node-xmpp","id":5985248,"avatar_url":"https://avatars.githubusercontent.com/u/5985248?v=3","gravatar_id":"","url":"https://api.github.com/users/node-xmpp","html_url":"https://github.com/node-xmpp","followers_url":"https://api.github.com/users/node-xmpp/followers","following_url":"https://api.github.com/users/node-xmpp/following{/other_user}","gists_url":"https://api.github.com/users/node-xmpp/gists{/gist_id}","starred_url":"https://api.github.com/users/node-xmpp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/node-xmpp/subscriptions","organizations_url":"https://api.github.com/users/node-xmpp/orgs","repos_url":"https://api.github.com/users/node-xmpp/repos","events_url":"https://api.github.com/users/node-xmpp/events{/privacy}","received_events_url":"https://api.github.com/users/node-xmpp/received_events","type":"Organization","site_admin":false},"repo":{"id":1098770,"name":"ltx","full_name":"node-xmpp/ltx","owner":{"login":"node-xmpp","id":5985248,"avatar_url":"https://avatars.githubusercontent.com/u/5985248?v=3","gravatar_id":"","url":"https://api.github.com/users/node-xmpp","html_url":"https://github.com/node-xmpp","followers_url":"https://api.github.com/users/node-xmpp/followers","following_url":"https://api.github.com/users/node-xmpp/following{/other_user}","gists_url":"https://api.github.com/users/node-xmpp/gists{/gist_id}","starred_url":"https://api.github.com/users/node-xmpp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/node-xmpp/subscriptions","organizations_url":"https://api.github.com/users/node-xmpp/orgs","repos_url":"https://api.github.com/users/node-xmpp/repos","events_url":"https://api.github.com/users/node-xmpp/events{/privacy}","received_events_url":"https://api.github.com/users/node-xmpp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/node-xmpp/ltx","description":"<xml for=\"node.js","fork":false,"url":"https://api.github.com/repos/node-xmpp/ltx","forks_url":"https://api.github.com/repos/node-xmpp/ltx/forks","keys_url":"https://api.github.com/repos/node-xmpp/ltx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/node-xmpp/ltx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/node-xmpp/ltx/teams","hooks_url":"https://api.github.com/repos/node-xmpp/ltx/hooks","issue_events_url":"https://api.github.com/repos/node-xmpp/ltx/issues/events{/number}","events_url":"https://api.github.com/repos/node-xmpp/ltx/events","assignees_url":"https://api.github.com/repos/node-xmpp/ltx/assignees{/user}","branches_url":"https://api.github.com/repos/node-xmpp/ltx/branches{/branch}","tags_url":"https://api.github.com/repos/node-xmpp/ltx/tags","blobs_url":"https://api.github.com/repos/node-xmpp/ltx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/node-xmpp/ltx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/node-xmpp/ltx/git/refs{/sha}","trees_url":"https://api.github.com/repos/node-xmpp/ltx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/node-xmpp/ltx/statuses/{sha}","languages_url":"https://api.github.com/repos/node-xmpp/ltx/languages","stargazers_url":"https://api.github.com/repos/node-xmpp/ltx/stargazers","contributors_url":"https://api.github.com/repos/node-xmpp/ltx/contributors","subscribers_url":"https://api.github.com/repos/node-xmpp/ltx/subscribers","subscription_url":"https://api.github.com/repos/node-xmpp/ltx/subscription","commits_url":"https://api.github.com/repos/node-xmpp/ltx/commits{/sha}","git_commits_url":"https://api.github.com/repos/node-xmpp/ltx/git/commits{/sha}","comments_url":"https://api.github.com/repos/node-xmpp/ltx/comments{/number}","issue_comment_url":"https://api.github.com/repos/node-xmpp/ltx/issues/comments{/number}","contents_url":"https://api.github.com/repos/node-xmpp/ltx/contents/{+path}","compare_url":"https://api.github.com/repos/node-xmpp/ltx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/node-xmpp/ltx/merges","archive_url":"https://api.github.com/repos/node-xmpp/ltx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/node-xmpp/ltx/downloads","issues_url":"https://api.github.com/repos/node-xmpp/ltx/issues{/number}","pulls_url":"https://api.github.com/repos/node-xmpp/ltx/pulls{/number}","milestones_url":"https://api.github.com/repos/node-xmpp/ltx/milestones{/number}","notifications_url":"https://api.github.com/repos/node-xmpp/ltx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/node-xmpp/ltx/labels{/name}","releases_url":"https://api.github.com/repos/node-xmpp/ltx/releases{/id}","created_at":"2010-11-21T01:13:17Z","updated_at":"2015-06-03T16:46:03Z","pushed_at":"2015-08-26T11:28:48Z","git_url":"git://github.com/node-xmpp/ltx.git","ssh_url":"git@github.com:node-xmpp/ltx.git","clone_url":"https://github.com/node-xmpp/ltx.git","svn_url":"https://github.com/node-xmpp/ltx","homepage":"http://node-xmpp.org","size":961,"stargazers_count":44,"watchers_count":44,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":7,"forks":25,"open_issues":7,"watchers":44,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/node-xmpp/ltx/pulls/60"},"html":{"href":"https://github.com/node-xmpp/ltx/pull/60"},"issue":{"href":"https://api.github.com/repos/node-xmpp/ltx/issues/60"},"comments":{"href":"https://api.github.com/repos/node-xmpp/ltx/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/node-xmpp/ltx/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/node-xmpp/ltx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/node-xmpp/ltx/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/node-xmpp/ltx/statuses/d6e51fac64e861e210db81141ca8136f335f30d9"}}}}