mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-20 15:56:35 +00:00
Remove shadowroot from ha-markdown-element (#9187)
This commit is contained in:
parent
9f32d72a41
commit
f4ffbe67e2
@ -10,11 +10,8 @@ class HaMarkdownElement extends ReactiveElement {
|
||||
|
||||
@property({ type: Boolean }) public breaks = false;
|
||||
|
||||
public connectedCallback() {
|
||||
super.connectedCallback();
|
||||
if (!this.shadowRoot) {
|
||||
this.attachShadow({ mode: "open" });
|
||||
}
|
||||
protected createRenderRoot() {
|
||||
return this;
|
||||
}
|
||||
|
||||
protected update(changedProps) {
|
||||
@ -25,7 +22,7 @@ class HaMarkdownElement extends ReactiveElement {
|
||||
}
|
||||
|
||||
private async _render() {
|
||||
this.shadowRoot!.innerHTML = await renderMarkdown(
|
||||
this.innerHTML = await renderMarkdown(
|
||||
this.content,
|
||||
{
|
||||
breaks: this.breaks,
|
||||
@ -39,8 +36,10 @@ class HaMarkdownElement extends ReactiveElement {
|
||||
this._resize();
|
||||
|
||||
const walker = document.createTreeWalker(
|
||||
this.shadowRoot!,
|
||||
1 /* SHOW_ELEMENT */
|
||||
this,
|
||||
1 /* SHOW_ELEMENT */,
|
||||
null,
|
||||
false
|
||||
);
|
||||
|
||||
while (walker.nextNode()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user