From 01019a9dcef67429d68e51cc6227c5a980fe7caf Mon Sep 17 00:00:00 2001 From: Jonny Gerig Meyer Date: Fri, 19 Jul 2024 11:15:06 -0400 Subject: [PATCH] Adjust docs --- CHANGELOG.md | 5 +++++ index.html | 26 +++++++++++++++----------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65b9cda..ccf42c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Popover Attribute Polyfill Changelog +## Unreleased + +- šŸ› BUGFIX: Add support for slotting elements into popovers -- + [#215](https://github.com/oddbird/popover-polyfill/pull/215) + ## 0.4.3: 2024-04-26 - šŸ› BUGFIX: Check for `window` before applying polyfill -- diff --git a/index.html b/index.html index 6625729..c090af8 100644 --- a/index.html +++ b/index.html @@ -678,25 +678,24 @@

<div id="shadowedNestedPopover" popover>Shadowed Nested Popover</div> </div> -

- Element slotted in an Shadow Root Popover + Shadow Root Popover with Slotted Contents

Here, both the popover control button and the popover are created in - the Shadow DOM, but an element is slotted in the popover + the Shadow DOM, but an element is slotted in the popover.

-
I'm a slotted element
+
Iā€™m a slotted element
<!-- Shadow DOM -->
+><!-- Light DOM -->
+<div id="shadowHostWithSlot">
+  <div><span>Iā€™m a slotted element</span></div>
+</div>
+
+<!-- Shadow DOM -->
 <button popovertarget="shadowedPopoverWithSlot">
   Toggle Shadowed Popover
 </button>
 
 <div id="shadowedPopoverWithSlot" popover>
-  </slot></slot>
+  <slot></slot>
 </div>