handleSponsorImages() — fastapi Function Reference
Architecture documentation for the handleSponsorImages() function in custom.js from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD ccd902a6_8959_a158_664f_4800b10fc6b3["handleSponsorImages()"] 7bcfc807_293e_9fde_04cf_d1a772097850["main()"] 7bcfc807_293e_9fde_04cf_d1a772097850 -->|calls| ccd902a6_8959_a158_664f_4800b10fc6b3 415abf33_9daf_dfdc_6109_c2f3344872a5["showRandomAnnouncement()"] ccd902a6_8959_a158_664f_4800b10fc6b3 -->|calls| 415abf33_9daf_dfdc_6109_c2f3344872a5 style ccd902a6_8959_a158_664f_4800b10fc6b3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
docs/en/docs/js/custom.js lines 144–175
function handleSponsorImages() {
const announceRight = document.getElementById('announce-right');
if(!announceRight) return;
const sponsorImages = document.querySelectorAll('.sponsor-image');
const imagePromises = Array.from(sponsorImages).map(img => {
return new Promise((resolve, reject) => {
if (img.complete && img.naturalHeight !== 0) {
resolve();
} else {
img.addEventListener('load', () => {
if (img.naturalHeight !== 0) {
resolve();
} else {
reject();
}
});
img.addEventListener('error', reject);
}
});
});
Promise.all(imagePromises)
.then(() => {
announceRight.style.display = 'block';
showRandomAnnouncement('announce-right', 10000);
})
.catch(() => {
// do nothing
});
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does handleSponsorImages() do?
handleSponsorImages() is a function in the fastapi codebase.
What does handleSponsorImages() call?
handleSponsorImages() calls 1 function(s): showRandomAnnouncement.
What calls handleSponsorImages()?
handleSponsorImages() is called by 1 function(s): main.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free