{"action":"created","issue":{"url":"https://api.github.com/repos/cure53/DOMPurify/issues/62","labels_url":"https://api.github.com/repos/cure53/DOMPurify/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/cure53/DOMPurify/issues/62/comments","events_url":"https://api.github.com/repos/cure53/DOMPurify/issues/62/events","html_url":"https://github.com/cure53/DOMPurify/issues/62","id":80916546,"number":62,"title":"Option to return a DocumentFragment instead of html","user":{"login":"Joris-van-der-Wel","id":745898,"avatar_url":"https://avatars.githubusercontent.com/u/745898?v=3","gravatar_id":"","url":"https://api.github.com/users/Joris-van-der-Wel","html_url":"https://github.com/Joris-van-der-Wel","followers_url":"https://api.github.com/users/Joris-van-der-Wel/followers","following_url":"https://api.github.com/users/Joris-van-der-Wel/following{/other_user}","gists_url":"https://api.github.com/users/Joris-van-der-Wel/gists{/gist_id}","starred_url":"https://api.github.com/users/Joris-van-der-Wel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joris-van-der-Wel/subscriptions","organizations_url":"https://api.github.com/users/Joris-van-der-Wel/orgs","repos_url":"https://api.github.com/users/Joris-van-der-Wel/repos","events_url":"https://api.github.com/users/Joris-van-der-Wel/events{/privacy}","received_events_url":"https://api.github.com/users/Joris-van-der-Wel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-26T11:17:19Z","updated_at":"2015-05-27T11:10:31Z","closed_at":null,"body":"The way I am currently using dompurify looks like this:\r\n\r\n```javascript\r\nvar html = this.databaseEntity.foo;\r\nhtml = dompurify(this.document.defaultView).sanitize(html);\r\nvar fragment = parseHTMLSnippit(this.document.defaultView, html);\r\nthis.bar.appendChild(fragment);\r\n```\r\n\r\nWhich means the html is being parsed twice. It would be useful if there was an option in dompurify to return a DocumentFragment. (adopted/imported into the document dompurify has been constructed with). \r\n\r\nFor example:\r\n\r\n```javascript\r\nvar html = this.databaseEntity.foo;\r\nvar fragment = dompurify(this.document.defaultView).sanitize(html, {output: 'fragment'});\r\nthis.bar.appendChild(fragment);\r\n```"},"comment":{"url":"https://api.github.com/repos/cure53/DOMPurify/issues/comments/105873255","html_url":"https://github.com/cure53/DOMPurify/issues/62#issuecomment-105873255","issue_url":"https://api.github.com/repos/cure53/DOMPurify/issues/62","id":105873255,"user":{"login":"Joris-van-der-Wel","id":745898,"avatar_url":"https://avatars.githubusercontent.com/u/745898?v=3","gravatar_id":"","url":"https://api.github.com/users/Joris-van-der-Wel","html_url":"https://github.com/Joris-van-der-Wel","followers_url":"https://api.github.com/users/Joris-van-der-Wel/followers","following_url":"https://api.github.com/users/Joris-van-der-Wel/following{/other_user}","gists_url":"https://api.github.com/users/Joris-van-der-Wel/gists{/gist_id}","starred_url":"https://api.github.com/users/Joris-van-der-Wel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joris-van-der-Wel/subscriptions","organizations_url":"https://api.github.com/users/Joris-van-der-Wel/orgs","repos_url":"https://api.github.com/users/Joris-van-der-Wel/repos","events_url":"https://api.github.com/users/Joris-van-der-Wel/events{/privacy}","received_events_url":"https://api.github.com/users/Joris-van-der-Wel/received_events","type":"User","site_admin":false},"created_at":"2015-05-27T11:10:31Z","updated_at":"2015-05-27T11:10:31Z","body":"Sounds good, I'll whip up a PR"}}