-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update browser serializations to use a custom element instead of `<me…
…ta>` (#836) * Update browser serializations to use a custom element instead of `<meta>` * Use consistent attribute names * Fixes * Fix retrieval of initial serialization values * Fix environment variable e2e test
- Loading branch information
Showing
9 changed files
with
73 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'@quilted/browser': patch | ||
'@quilted/preact-browser': patch | ||
'@quilted/react-query': patch | ||
'@quilted/quilt': patch | ||
--- | ||
|
||
Update browser serializations to use a custom element instead of `<meta>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export * from './types.ts'; | ||
export {Browser, BrowserCookies} from './browser.ts'; | ||
export * from './browser.ts'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
packages/preact-browser/source/server/components/Serialize.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import {useResponseSerialization} from '../hooks/serialized.ts'; | ||
|
||
export function Serialize<T = unknown>({ | ||
id, | ||
value, | ||
name, | ||
content, | ||
}: { | ||
id: string; | ||
value: T | (() => T); | ||
name: string; | ||
content: T | (() => T); | ||
}) { | ||
if (typeof document === 'object') return null; | ||
useResponseSerialization(id, value); | ||
useResponseSerialization(name, content); | ||
return null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters