Skip to content

feat: add support for serializable option in shadow DOM#118

Merged
rschristian merged 9 commits into
preactjs:masterfrom
fusionstrings:serializable
Oct 25, 2025
Merged

feat: add support for serializable option in shadow DOM#118
rschristian merged 9 commits into
preactjs:masterfrom
fusionstrings:serializable

Conversation

@fusionstrings

@fusionstrings fusionstrings commented Oct 24, 2025

Copy link
Copy Markdown
Contributor

Adds support for the serializable option when creating shadow DOM. This helps serialising shadow DOM for server-side rendering scenarios.
This change is backward compatible

Changes

  • Added serializable?: boolean option
  • Added test coverage for the new option

Usage

register(MyComponent, 'my-element', [], { 
    shadow: true, 
    serializable: true 
});

Reference

Comment thread test/index.test.jsx Outdated
Comment thread src/index.js Outdated
Comment thread README.md Outdated
Comment thread test/index.test.jsx

@rschristian rschristian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cheers

@rschristian rschristian merged commit 0a8ccf7 into preactjs:master Oct 25, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants