
Some GrabHelper uses are in the form: doPreGrabStuff(); this._grabHelper.grab({ onUngrab: () => { undoPreGrabStuff(); }, }); A promise-based variant allows to write this more cleanly as: doPreGrabStuff(); await this._grabHelper.grabAsync(); undoPreGrabStuff(); https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/903