{"action":"created","issue":{"url":"https://api.github.com/repos/webcomponents/webcomponentsjs/issues/498","repository_url":"https://api.github.com/repos/webcomponents/webcomponentsjs","labels_url":"https://api.github.com/repos/webcomponents/webcomponentsjs/issues/498/labels{/name}","comments_url":"https://api.github.com/repos/webcomponents/webcomponentsjs/issues/498/comments","events_url":"https://api.github.com/repos/webcomponents/webcomponentsjs/issues/498/events","html_url":"https://github.com/webcomponents/webcomponentsjs/issues/498","id":136055277,"number":498,"title":"nested `template` disappears when stamped but not distributed by shadow host","user":{"login":"tomalec","id":17435,"avatar_url":"https://avatars.githubusercontent.com/u/17435?v=3","gravatar_id":"","url":"https://api.github.com/users/tomalec","html_url":"https://github.com/tomalec","followers_url":"https://api.github.com/users/tomalec/followers","following_url":"https://api.github.com/users/tomalec/following{/other_user}","gists_url":"https://api.github.com/users/tomalec/gists{/gist_id}","starred_url":"https://api.github.com/users/tomalec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomalec/subscriptions","organizations_url":"https://api.github.com/users/tomalec/orgs","repos_url":"https://api.github.com/users/tomalec/repos","events_url":"https://api.github.com/users/tomalec/events{/privacy}","received_events_url":"https://api.github.com/users/tomalec/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-24T12:58:53Z","updated_at":"2016-02-26T07:45:24Z","closed_at":null,"body":"### Description\r\nWhen `template` is inserted to shadow host, but not distributed, then it it is not available in document tree.\r\n\r\n#### Live Demo\r\nhttp://jsbin.com/fecofo/4/edit?html,js,console,output\r\n\r\n#### Steps to Reproduce\r\n1. Create `my-element` witch shadow dom, and content distribution\r\n2. Append `my-element` to `document.body`\r\n3. Create `template` with another `<template>` inside.\r\n4. Stamp parent `template` contents into `<my-element>`\r\n\r\n\r\n#### Expected Results\r\n`<template>` element is available in document tree (light DOM), for example to be selected with `querySelector`, or removed.\r\n\r\n#### Actual Results\r\nparent `template`'s content is stamped without nested `template` element\r\n\r\n### Browsers Affected\r\n- [ ] Chrome\r\n- [x] Firefox\r\n- [x] IE 11\r\n\r\nI didn't check, but I suspect, other polyfilled browsers are also affected\r\n- [x] Edge\r\n- [x] Safari 9\r\n- [x] Safari 8 \r\n\r\n### Versions\r\n- webcomponents.js: 0.7.21\r\n\r\n\r\n### Other comments\r\nWhen the parent/host element, does not have shadow tree, stamping works as expected.\r\n"},"comment":{"url":"https://api.github.com/repos/webcomponents/webcomponentsjs/issues/comments/189150671","html_url":"https://github.com/webcomponents/webcomponentsjs/issues/498#issuecomment-189150671","issue_url":"https://api.github.com/repos/webcomponents/webcomponentsjs/issues/498","id":189150671,"user":{"login":"warpech","id":566463,"avatar_url":"https://avatars.githubusercontent.com/u/566463?v=3","gravatar_id":"","url":"https://api.github.com/users/warpech","html_url":"https://github.com/warpech","followers_url":"https://api.github.com/users/warpech/followers","following_url":"https://api.github.com/users/warpech/following{/other_user}","gists_url":"https://api.github.com/users/warpech/gists{/gist_id}","starred_url":"https://api.github.com/users/warpech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/warpech/subscriptions","organizations_url":"https://api.github.com/users/warpech/orgs","repos_url":"https://api.github.com/users/warpech/repos","events_url":"https://api.github.com/users/warpech/events{/privacy}","received_events_url":"https://api.github.com/users/warpech/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T07:45:24Z","updated_at":"2016-02-26T07:45:24Z","body":"I just checked that in addition to `querySelector` and `querySelectorAll`, the bug is also reproducible in polyfill's `getElementsByTagName` and `getElementById`."}}