interface KlarnaButton { htmlElement : HTMLElement ; id ?: string ; mount ( containerSelector : string ) : this ; mount ( containerElement : HTMLElement ) : this ; on ( event : "render" , callback : ( button : this ) => Promise < void > ) : this ; on ( event : "click" , callback : ( button : this ) => Promise < void > ) : this ; toggleState ( state : "disabled" | "loading" , value ?: boolean ) : this ; unmount () : this ; } Propertieshtml Element htmlElement : HTMLElement
Methodsmount mount ( containerSelector : string ) : this Parameters containerSelector : string Returns this mount ( containerElement : HTMLElement ) : this Parameters containerElement : HTMLElement Returns this on on ( event : "render" , callback : ( button : this ) => Promise < void > ) : this Parameters event : "render" callback : ( button : this ) => Promise < void > Returns this on ( event : "click" , callback : ( button : this ) => Promise < void > ) : this Parameters event : "click" callback : ( button : this ) => Promise < void > Returns this toggle State toggleState ( state : "disabled" | "loading" , value ?: boolean ) : this Parameters state : "disabled" | "loading" Optional
value : boolean Returns this unmount unmount () : this Returns this
The
render
event is triggered after the button is fully visible.