Skip to content

Commit

Permalink
Merge pull request #899 from crypto-scythe/task/898-shadowroot-change…
Browse files Browse the repository at this point in the history
…d-to-shadowrootmode

#898@minor: Change deprecated shadowroot attribute to shadowrootmode.
  • Loading branch information
capricorn86 committed May 11, 2023
2 parents 7f5bd17 + b23d564 commit 2291dc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/happy-dom/src/xml-serializer/XMLSerializer.ts
Expand Up @@ -42,7 +42,7 @@ export default class XMLSerializer {
}

if (options?.includeShadowRoots && element.shadowRoot) {
innerHTML += `<template shadowroot="${element.shadowRoot.mode}">`;
innerHTML += `<template shadowrootmode="${element.shadowRoot.mode}">`;

for (const node of element.shadowRoot.childNodes) {
innerHTML += this.serializeToString(node, options);
Expand Down
Expand Up @@ -157,7 +157,7 @@ describe('XMLSerializer', () => {
<div>
<custom-element key1="value1" key2="value2">
<span>Slotted content</span>
<template shadowroot="open">
<template shadowrootmode="open">
<style>
:host {
display: block;
Expand Down

0 comments on commit 2291dc3

Please sign in to comment.