On Tue, May 30, 2017 at 2:52 AM, <[email protected]> wrote: > Or using ES2017, something like: > > let sData = await GM.getValue("serialised") ; > let oData = JSON.parse(sData) ; > // useful things still happen here. > > I've largely decided to go for ideal design/good performance. Since I'm also learning the new WebExt APIs along the way I might not do so perfectly, but I'm trying. This means new async APIs. The possibility for compatibility-increasing shims, even perhaps automatic ones, is not impossible. But this proposal you have above is basically exactly what I'm doing. New APIs return promises. You can await <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await> a promise and get code like the example you've got above.
We've been through painful compatibility migrations in the past. They're not awesome, but they happen. Plus, roughly half of all scripts use no privileged APIs and won't be affected. In the future we can invest effort into repairing compatibility with old scripts that haven't been updated. But now (read: by the time 57 is out and we have to do something to not break 100%) we'll have something that works, and efficiently. -- 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.
