Closed VinayKrMittal closed 1 year ago
when I try to get the content of template in react using template.content then it always gives empty response, because react using template.appendChild instead of template.content.appendChild and we get empty response (https://stackoverflow.com/questions/70677604/template-content-is-an-empty-document-fragment). so, we have to use dangerouslySetInnerHTML to set the content in template tag (https://stackoverflow.com/questions/42845195/how-can-i-render-a-template-tag-with-react) and it should be updated in package itself.
template.content
dangerouslySetInnerHTML
Need to get template content as this feature is experimental (https://caniuse.com/declarative-shadow-dom) and not supported by all the browser and we are adding polyfill for the same.
Fix has been merged in MR https://github.com/Wildhoney/ReactShadow/pull/142. Closing this issue.
when I try to get the content of template in react using
template.content
then it always gives empty response, because react using template.appendChild instead of template.content.appendChild and we get empty response (https://stackoverflow.com/questions/70677604/template-content-is-an-empty-document-fragment). so, we have to usedangerouslySetInnerHTML
to set the content in template tag (https://stackoverflow.com/questions/42845195/how-can-i-render-a-template-tag-with-react) and it should be updated in package itself.Need to get template content as this feature is experimental (https://caniuse.com/declarative-shadow-dom) and not supported by all the browser and we are adding polyfill for the same.