mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
chore: add crossorigin to resource tags (#12031)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added the crossorigin attribute to all CSS and JavaScript tags in generated HTML, improving compatibility for cross-origin resource loading. - **Tests** - Updated tests to verify the presence of the crossorigin attribute in script tags. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -194,11 +194,11 @@ export class DocRendererController {
|
||||
${Object.entries(envMeta)
|
||||
.map(([key, val]) => `<meta name="env:${key}" content="${val}" />`)
|
||||
.join('\n')}
|
||||
${assets.css.map(url => `<link rel="stylesheet" href="${url}" />`).join('\n')}
|
||||
${assets.css.map(url => `<link rel="stylesheet" href="${url}" crossorigin />`).join('\n')}
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" data-version="${assets.gitHash}"></div>
|
||||
${assets.js.map(url => `<script src="${url}"></script>`).join('\n')}
|
||||
${assets.js.map(url => `<script src="${url}" crossorigin></script>`).join('\n')}
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user