Przekazywanie instancji obiektu do callbackFn

This commit is contained in:
2025-12-15 09:29:21 +01:00
parent a1d1a64aac
commit 93f91a4b16
2 changed files with 7 additions and 2 deletions

View File

@@ -513,7 +513,6 @@ class IdmHotspot{
this.handleHideSecondImage = this.handleHideSecondImage.bind(this);
this.handleSelectVersion = this.handleSelectVersion.bind(this);
this.handleSelectSize = this.handleSelectSize.bind(this);
this.init();
}
@@ -1753,7 +1752,7 @@ class IdmHotspot{
console.log(`Initialized hotspot #${this.id}`);
// funkcja wykonująca się po ramce rekomendacji
if(typeof this.options?.callbackFn === "function") this.options?.callbackFn();
if(typeof this.options?.callbackFn === "function") this.options?.callbackFn(this);
}catch(err){
console.error(idmHotspotTextObject["Wystąpił błąd z inicjalizacją. Proszę odśwież stronę"], err);
}