Thank you very much, @jonatandor35 ! I can now close about a dozen browser windows with information about promises that have been open for several days. Let’s hope it will be a while before I have to open them all again.
On reflection, there is nothing odd about the return statements. They are just …
return function ( stuff );
… for a comparatively large amount of stuff.
As a small follow-up that others may find useful, I think console.log() has some random latency and is therefore a blunt instrument for checking sequences of events that come within a fraction of a second of each other.
console.log("Refreshed",stamp.getTime() % 10000);
… reveals that things are now happening in the right sequence, even if the slightly later time is logged before the slightly earlier time.