The above method written in JS is invoked from
As per the documentation provided in Console Developer guide,
getEnclosingTabId() methods are supported in both Classic and Lightning and no additional considerations are required to make the methods work in Lightning. But I see that the
closeTab() functionality is not working as expected when accessed in Lightning experience.
I see there are some equivalent method which are supported only in Lightning Console here.
But this is called from within a Lightning component. How can I do that from a VisualForce page?