Skip to content

Commit

Permalink
refactor(@angular/ssr): mark LINK_LOAD_SCRIPT_CONTENT as @PURE
Browse files Browse the repository at this point in the history
This const is pure.

(cherry picked from commit f7c0a83)
  • Loading branch information
alan-agius4 authored and dgp1130 committed Dec 17, 2024
1 parent df36a86 commit 5ebeb37
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/angular/ssr/src/utils/inline-critical-css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -57,7 +56,7 @@ const LINK_LOAD_SCRIPT_CONTENT = `
};
documentElement.addEventListener('load', listener, true);
})();`;
})();`)();

/** Partial representation of an `HTMLElement`. */
interface PartialHTMLElement {
Expand Down

0 comments on commit 5ebeb37

Please sign in to comment.