I have a lightning component embedded within a visualforce page. The problem I have is that I need to get the url I see in my browser and I do not know why when I want to get the url with window.location.host I always get the URL of the type www.things.visual.force.com instead of www .things.lightning.force.com
I tried then using this solution
get the theme and through the theme if it is lightning or classic I build the url by hand but to get the theme despite being from lightning gives me the classic theme
Does anyone know how to really determine if a user is in lightning or classic?