Closed johncalvinyoung closed 3 months ago
Thanks for the report! I imagine this can be escaped by wrapping it in a <foreignObject>
tag to revert to HTML namespace, but will experiment with it.
It appears to work, but as we are back in the HTML namespace, the wrapping <svg>
tag is needed, I.E.
<ph-acorn size="48">
<svg width="100%" height="100%">
<circle cx="50%" cy="50%" r="25%"/>
</svg>
</ph-acorn>
There is no way to slot SVG namespaced elements in a shadow DOM. And this is starting to be a lot more awkward than simply stacking layers manually with CSS. I think I'll just nix the feature from this library, since it never worked to begin with.
Describe the bug
A
<slot>
element is not a valid child of a<svg>
element, and crashes Chromedriver when asked for the text of the page.Steps to Reproduce
Using capybara -> selenium-webdriver -> chromedriver...
Expected behavior
does not crash. Capybara's
have_content
selector eventually ends up asking Selenium for the text content of the page.Screenshots
Context (please complete the following information):
Additional notes:
ph-trash
into my own component (also using Lit). Crash continued. Removing the<slot>
fixed the crash. Moving the<slot>
outside of the<svg>
element fixed the crash.assignedNodes
is part of the HTMLSlotElement specification, so a<slot>
in<svg>
is recognized by one part of the browser but not up-fit toHTMLSlotElement
, leading to the crash.