mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 02:54:21 +08:00
refactor(@angular/ssr): mark LINK_LOAD_SCRIPT_CONTENT
as @PURE
This const is pure.
This commit is contained in:
parent
60c79c0649
commit
f7c0a83c5d
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user