Retrieve API version in a gnome-shell extension

Hi,
The interface of the Meta.restart function has changed between version 10 and version 11 of the gnome platform API.
Is there a way to retrieve the API version in a gnome-shell extension to know how to call this function at runtime ?
Regards.

Yes, it is exposed as LIBMUTTER_API_VERSION in the config module.

Alternatively, you can use a functional check, for example something like

if (Meta.Context !== undefined)
    Meta.restart(msg, global.context);
else
    Meta.restart(mgs);

Thanks a lot @fmuellner.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.