shadowrootmode
attribute does not work in Blazor files
#55164
Labels
area-blazor
Includes: Blazor, Razor Components
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
Milestone
Is there an existing issue for this?
Describe the bug
Adding
<template shadowrootmode="open">
to a Blazor file produces a regulartemplate
element with a DocumentFragment child node.Expected Behavior
The
<template shadowrootmode="open">
should be parsed as a declarative shadow DOM as it would be in a regular HTML file.Steps To Reproduce
<template shadowrootmode="open">Test</template>
to a .razor page.Exceptions (if any)
No response
.NET Version
8.0.202
Anything else?
(This rule)[https://developer.chrome.com/docs/css-ui/declarative-shadow-dom#parser-only] seems to be the cause of the bug. When Blazor builds the component, it should account for
shadowrootmode
attributes and create a shadow DOM if necessary.NOTE: This was originally reported at #44986, however this was before the
shadowrootmode
attribute was standardized and widely supported. I am reopening this as a bug report now that this has changed.Also note that #44986 was marked as a duplicate of #34641 which is requests a very different feature from this bug report.
The text was updated successfully, but these errors were encountered: