refactor(@angular/ssr): mark LINK_LOAD_SCRIPT_CONTENT as @PURE

This const is pure.
This commit is contained in:
Alan Agius 2024-12-17 13:54:17 +00:00 committed by Douglas Parker
parent 60c79c0649
commit f7c0a83c5d

View File

@ -32,8 +32,7 @@ const CSP_MEDIA_ATTR = 'ngCspMedia';
* - Removes the event listener when all relevant `<link>` tags have been processed.
* - Uses event capturing (the `true` parameter) since load events do not bubble up the DOM.
*/
const LINK_LOAD_SCRIPT_CONTENT = `
(() => {
const LINK_LOAD_SCRIPT_CONTENT = /* @__PURE__ */ (() => `(() => {
const CSP_MEDIA_ATTR = '${CSP_MEDIA_ATTR}';
const documentElement = document.documentElement;
@ -57,7 +56,7 @@ const LINK_LOAD_SCRIPT_CONTENT = `
};
documentElement.addEventListener('load', listener, true);
})();`;
})();`)();
/** Partial representation of an `HTMLElement`. */
interface PartialHTMLElement {