Hello, answers inline.
Yes, every function upwards the call chain. It doesn't change
anything for you though (except that you have to type the keywords).
The await keyword automatically unwraps the Promise object. Don't be
afraid, it's easy.
It's not like he had a real choice there. The WebExtension API does
not include several functionalities that were used in GM 3.7, so the
changes would've been breaking ones anyway.
That being said, this was a rare opportunity to fix many quirks and
introduce larger changes, like fixing weird naming or introducing
the asnychronous API calls.
Many scripts will most likely need to be modified anyway...
Definitely. Many people haven't cared to update their scripts in
advance (using polyfill), in spite of the announcement about the
breaking changes as of September 20th, 2017.
Making GM 3.7 work in Quantum is impossible due to the changes in
the WebExtensions API. You can always make something that uses the a
functional subset of an API (WE) work on the full API (XPCOM/XUL),
but obviously not the other way round if it used functionality that
is not in the subset (like GM 3.7 does).
For making GM 4.0 scripts (i. e. ones that use asynchronous calls
like await GM.setValue) work on GM 3.7 and Tampermonkey etc., there
is a polyfill script. For more information, see
In a nutshell, the polyfill script adds the GM[dot] promise
functions, and makes them internally call the old API wrapped inside
a promise object.
That way you can update the scripts to the new standard of using
async and await with the GM[dot] instead of GM[underscore]
functions, but they continue to work on the other engines.
After all, the best way it COULD HAVE been is:
After being notified in September, immediately update your scripts
1) use async / await
2) include both grant statements like GM.setValue and GM_setValue
3) use the polyfill script
That means everyone can update their scripts in advance, but keeping
them functional in earlier versions like GM 3.7.
The moment GM 4.0 is rolled out, the script continues to work on the
new API and the polyfill does nothing (since it only registers
callbacks for undefined functions).
But alas, userscripts are exactly THAT, "user"scripts - and users
are update procrastinators ("it works now, why change it now?"). ;)