Add didInitialize to Keycloak typings (#32331)

Closes #27040

Signed-off-by: Mаартен - Maarten <maarten@oudenniel.nl>
Co-authored-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
Mаартен - Maarten 2024-09-03 14:52:23 +02:00 committed by GitHub
parent 5308313046
commit f5ce5e0480
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View file

@ -450,6 +450,11 @@ declare class Keycloak {
*/
timeSkew?: number;
/**
* Whether the instance has been initialized by calling `.init()`.
*/
didInitialize: boolean;
/**
* @private Undocumented.
*/

View file

@ -37,6 +37,8 @@ function Keycloak (config) {
interval: 5
};
kc.didInitialize = false;
var scripts = document.getElementsByTagName('script');
for (var i = 0; i < scripts.length; i++) {
if ((scripts[i].src.indexOf('keycloak.js') !== -1 || scripts[i].src.indexOf('keycloak.min.js') !== -1) && scripts[i].src.indexOf('version=') !== -1) {