{"action":"created","issue":{"url":"https://api.github.com/repos/tmpvar/jsdom/issues/1045","labels_url":"https://api.github.com/repos/tmpvar/jsdom/issues/1045/labels{/name}","comments_url":"https://api.github.com/repos/tmpvar/jsdom/issues/1045/comments","events_url":"https://api.github.com/repos/tmpvar/jsdom/issues/1045/events","html_url":"https://github.com/tmpvar/jsdom/issues/1045","id":59210954,"number":1045,"title":"Custom html tags  '_ownerDocument' of undefined","user":{"login":"GianlucaGuarini","id":879612,"avatar_url":"https://avatars.githubusercontent.com/u/879612?v=3","gravatar_id":"","url":"https://api.github.com/users/GianlucaGuarini","html_url":"https://github.com/GianlucaGuarini","followers_url":"https://api.github.com/users/GianlucaGuarini/followers","following_url":"https://api.github.com/users/GianlucaGuarini/following{/other_user}","gists_url":"https://api.github.com/users/GianlucaGuarini/gists{/gist_id}","starred_url":"https://api.github.com/users/GianlucaGuarini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GianlucaGuarini/subscriptions","organizations_url":"https://api.github.com/users/GianlucaGuarini/orgs","repos_url":"https://api.github.com/users/GianlucaGuarini/repos","events_url":"https://api.github.com/users/GianlucaGuarini/events{/privacy}","received_events_url":"https://api.github.com/users/GianlucaGuarini/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-27T09:33:56Z","updated_at":"2015-02-27T09:39:43Z","closed_at":null,"body":"I got this issue by using a custom html tag:\r\n```javascript\r\njsdom.env('<!doctype html><html><head></head><body><' + myComponent +'/></body></html>', function (errors, window) {\r\n  global.document = window.document\r\n  console.log(document.body.innerHTML) // <my-component></my-component>\r\n})\r\n```\r\n```shell\r\n/Users/gianlucaguarini/Sites/www/riotjs/node_modules/jsdom/lib/jsdom/level1/core.js:579\r\n    if (!newChild._ownerDocument) newChild._ownerDocument = this._ownerDocumen\r\n                 ^\r\nTypeError: Cannot read property '_ownerDocument' of undefined\r\n    at core.Node.insertBefore (/Users/gianlucaguarini/Sites/www/riotjs/node_modules/jsdom/lib/jsdom/level1/core.js:579:18)\r\n    at core.Node.insertBefore (/Users/gianlucaguarini/Sites/www/riotjs/node_modules/jsdom/lib/jsdom/level2/events.js:326:32)\r\n```"},"comment":{"url":"https://api.github.com/repos/tmpvar/jsdom/issues/comments/76363566","html_url":"https://github.com/tmpvar/jsdom/issues/1045#issuecomment-76363566","issue_url":"https://api.github.com/repos/tmpvar/jsdom/issues/1045","id":76363566,"user":{"login":"GianlucaGuarini","id":879612,"avatar_url":"https://avatars.githubusercontent.com/u/879612?v=3","gravatar_id":"","url":"https://api.github.com/users/GianlucaGuarini","html_url":"https://github.com/GianlucaGuarini","followers_url":"https://api.github.com/users/GianlucaGuarini/followers","following_url":"https://api.github.com/users/GianlucaGuarini/following{/other_user}","gists_url":"https://api.github.com/users/GianlucaGuarini/gists{/gist_id}","starred_url":"https://api.github.com/users/GianlucaGuarini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GianlucaGuarini/subscriptions","organizations_url":"https://api.github.com/users/GianlucaGuarini/orgs","repos_url":"https://api.github.com/users/GianlucaGuarini/repos","events_url":"https://api.github.com/users/GianlucaGuarini/events{/privacy}","received_events_url":"https://api.github.com/users/GianlucaGuarini/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T09:39:43Z","updated_at":"2015-02-27T09:39:43Z","body":"I have tested iojs v1.0.2 as well and I got the same issue"}}