handleSponsorImages() — fastapi Function Reference
Architecture documentation for the handleSponsorImages() function in custom.js from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD bc4b7342_8b2c_f549_6a06_c3481345114d["handleSponsorImages()"] 49961dba_6b4d_9e52_de16_4ef5b04a5bea["custom.js"] bc4b7342_8b2c_f549_6a06_c3481345114d -->|defined in| 49961dba_6b4d_9e52_de16_4ef5b04a5bea 8d44dec4_66f2_396b_ce76_60bcbff6d1e8["main()"] 8d44dec4_66f2_396b_ce76_60bcbff6d1e8 -->|calls| bc4b7342_8b2c_f549_6a06_c3481345114d 10029d9b_fc07_27cd_ecbc_58b6581f93df["showRandomAnnouncement()"] bc4b7342_8b2c_f549_6a06_c3481345114d -->|calls| 10029d9b_fc07_27cd_ecbc_58b6581f93df style bc4b7342_8b2c_f549_6a06_c3481345114d 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
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does handleSponsorImages() do?
handleSponsorImages() is a function in the fastapi codebase, defined in docs/en/docs/js/custom.js.
Where is handleSponsorImages() defined?
handleSponsorImages() is defined in docs/en/docs/js/custom.js at line 144.
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