Skip to content

Commit 4598ad4

Browse files
committed
DOC-3233: Update crossorigin function in release notes to match new implementaiton standard.
1 parent 1277c51 commit 4598ad4

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

modules/ROOT/pages/8.0-release-notes.adoc

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,22 +104,30 @@ For information on using Enhanced Skins & Icon Packs, see: xref:enhanced-skins-a
104104

105105
// CCFR here.
106106

107-
=== ScriptLoader cross-origin attribute support
107+
=== Enhanced cross-origin resource handling
108108

109-
Added configurable cross-origin attribute support to ScriptLoader. This improvement allows setting the `crossorigin` attribute for script loading, which is particularly important for {productname} Cloud deployments where browsers or security software might interfere with Referer headers. The new `crossorigin` option supports values such as "anonymous", following the same pattern as the existing `referrer_policy` option.
109+
Added a new function-based `crossorigin` configuration option that provides granular control over cross-origin resource loading for both scripts and stylesheets. This enhancement allows for URL-based decisions about crossorigin attributes, which is particularly important for {productname} Cloud deployments and complex hosting scenarios.
110110

111-
This improvement is especially relevant for {productname} {release-version} users utilizing {companyname} Cloud, as it ensures consistent loading behavior for both the main {productname} script and plugins when browsers or security software (like Norton Antivirus) interfere with Referer headers.
111+
The `crossorigin` option accepts a function that determines the appropriate attribute value based on the resource being loaded:
112112

113-
Example configuration:
114113
[source,js]
115114
----
116115
tinymce.init({
117116
selector: 'textarea',
118-
crossorigin: 'anonymous'
117+
crossorigin: (url, resourceType) => {
118+
// Add crossorigin="anonymous" for cross-origin resources
119+
if (url.startsWith('https://your-cdn.com')) {
120+
return 'anonymous';
121+
}
122+
// Omit crossorigin attribute for same-origin resources
123+
return '';
124+
}
119125
});
120126
----
121127

122-
For more details, see the xref:tinymce-and-cors.adoc[ScriptLoader cross-origin attribute support] section.
128+
This improvement ensures consistent resource loading behavior across different deployment scenarios and provides better control over CORS settings for both scripts and stylesheets.
129+
130+
For more details, see the xref:tinymce-and-cors.adoc#crossorigin[crossorigin configuration option] documentation.
123131

124132

125133
[[additions]]

0 commit comments

Comments
 (0)