changes to mimic google implementation

This commit is contained in:
carmenmaymo 2023-08-31 12:48:01 +02:00
parent 4797d53ad5
commit 63ab1e383d
No known key found for this signature in database
GPG key ID: 6023F686B0F3102E
20 changed files with 724 additions and 216 deletions

View file

@ -7,6 +7,7 @@ class ButtonModuleWatcher {
}
watchContextBootstrap(callable) {
console.log('ButtonModuleWatcher.js: watchContextBootstrap', this.contextBootstrapRegistry)
this.contextBootstrapWatchers.push(callable);
Object.values(this.contextBootstrapRegistry).forEach(callable);
}

View file

@ -26,7 +26,7 @@ export const loadPaypalScript = (config, onLoaded) => {
return;
}
options.isLoading = true;
console.log('ScriptLoading.js: loadPaypalScript', config)
// Arm a timeout so the module isn't locked on isLoading state on failure.
let loadingTimeout = setTimeout(() => {
console.error('Failed to load PayPal script.');