Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#898@minor: Change deprecated shadowroot attribute to shadowrootmode. #899

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/happy-dom/src/xml-serializer/XMLSerializer.ts
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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