1

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

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_variables_global_useruitheme.htm

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

Theme3

Does anyone know how to really determine if a user is in lightning or classic?

2
  • Not sure what you are trying to achieve using the page domain, if the purpose is to navigate based on the theme u can use sforce.one.navigateToSObject(event.getParams().recordId) like suggested in the trial head.trailhead.salesforce.com/en/projects/… Jun 20, 2018 at 3:17
  • Hi, thanks for your response. I do not need to navigate to any registry, I just need the url that is in the browser for another purpose Jun 20, 2018 at 9:51

0

You must log in to answer this question.

Browse other questions tagged .