Browse Source

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

pull/3762/head
Karl Kemister-Sheppard 7 days ago
committed by GitHub
parent
commit
91e545e80d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 20
      modules/ROOT/pages/8.0-release-notes.adoc

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

@ -108,16 +108,26 @@ For information on using Enhanced Skins & Icon Packs, see: xref:enhanced-skins-a
Added a new function-based `crossorigin` configuration option that provides granular control over cross-origin resource loading. The function receives the resource URL and type (script or stylesheet) as parameters and can return 'anonymous', 'use-credentials', or undefined to control the crossorigin attribute.
.Example: Setting `+crossorigin="anonymous"+` to script.
[source,html,subs="attributes+"]
----
<script src="{cdnurl}" referrerpolicy="origin" crossorigin="anonymous"></script>
----
Or;
.Example: Setting reusable constant function.
[source,js]
----
tinymce.init({
selector: 'textarea',
crossorigin: (url, resourceType) => {
const crossOriginFunction = (url, resourceType) => {
// Returning 'anonymous' or 'use-credentials' here would explicitly set the attribute
return 'anonymous';
// return 'use-credentials';
// return undefined; // Omit the 'crossorigin' attribute for all resources
}
// return undefined; // Omits the 'crossorigin' attribute for all resources by returning undefined
};
tinymce.init({
selector: "textarea",
crossorigin: crossOriginFunction
});
----

Loading…
Cancel
Save