Skip to content

Instantly share code, notes, and snippets.

@dfreedm
Created September 17, 2013 17:31
Show Gist options
  • Select an option

  • Save dfreedm/6597681 to your computer and use it in GitHub Desktop.

Select an option

Save dfreedm/6597681 to your computer and use it in GitHub Desktop.
Expose bug in ShadowDOM related to nested `<content>` element
<!DOCTYPE html>
<script src="polymer/ShadowDOM/shadowdom.js"></script>
<div id="host">
<p>Content</p>
</div>
<template id="t">
<div>
<div>
[<content></content>]
</div>
</div>
</template>
<script>
host = document.querySelector('#host');
t = document.querySelector('#t');
sr = host.createShadowRoot();
sr.appendChild(t.content.cloneNode(true));
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment