Hi Dave
But then I'm back to a method returning a Promise (which is what I was
trying to avoid) ? Can I easily get that value out of the Promise and
continue with it in a existing unaltered "synchronous script"? I can't see
how, so I think you are basically saying like Rod, it is impossible to
convert an asynchronous function into a synchronous function (in a nice
way) ?
On Monday, 9 October 2017 08:04:24 UTC+2, Dave Cooliave wrote:
>
> My message gets cut off for some reason. Here's the last part:
> var gm4test = {
> ...
> getValue: async function(name, defval) {
> var rt;
> if (typeof GM_getValue === 'function') {
> rt = GM_getValue(name, defval);
> } else {
> rt = await GM.getValue(name, defval);
> }
> return rt;
> },
> ...
> }
>
>
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/greasemonkey-users.
For more options, visit https://groups.google.com/d/optout.