detectScriptExecuted() — astro Function Reference
Architecture documentation for the detectScriptExecuted() function in swap-functions.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 7442dd09_46f2_a0fe_773c_8fbd679d5265["detectScriptExecuted()"] 12084e8e_15f3_27ac_8f8b_d442375ff33d["swap-functions.ts"] 7442dd09_46f2_a0fe_773c_8fbd679d5265 -->|defined in| 12084e8e_15f3_27ac_8f8b_d442375ff33d f570d89c_2f22_1cc8_1134_c80ecbaab163["deselectScripts()"] f570d89c_2f22_1cc8_1134_c80ecbaab163 -->|calls| 7442dd09_46f2_a0fe_773c_8fbd679d5265 style 7442dd09_46f2_a0fe_773c_8fbd679d5265 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/transitions/swap-functions.ts lines 12–17
export function detectScriptExecuted(script: HTMLScriptElement) {
const key = script.src ? new URL(script.src, location.href).href : script.textContent!;
if (scriptsAlreadyRan.has(key)) return true;
scriptsAlreadyRan.add(key);
return false;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does detectScriptExecuted() do?
detectScriptExecuted() is a function in the astro codebase, defined in packages/astro/src/transitions/swap-functions.ts.
Where is detectScriptExecuted() defined?
detectScriptExecuted() is defined in packages/astro/src/transitions/swap-functions.ts at line 12.
What calls detectScriptExecuted()?
detectScriptExecuted() is called by 1 function(s): deselectScripts.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free