You need to sign in to do that
Don't have an account?

Has anyone gotten the LinkedIn Hopscotch framework to work in Lightning?
TLDR:
Requirement:
Background:
- document.getElementsByClass()[0] returns undefined.
- My main question is at the bottom.
Requirement:
- We are trying to make a guide/ tour to onboard new Users through our Customer Community portal.
- Due to the complex process, it is not intuitive so we want to have a WalkMe like guide.
Background:
- I found Salesforce uses Hopscotch in the Community Builder when you first use it - it shows you all the tools etc.
- I added the Hopscotch zip file as a Static Resource
- I load the CSS style and JS scripts to a custom Lightning Component using <ltng:require>
- I add the Component to the Community page through the Builder.
- Hopscotch's Tour object has a parameter called Target which takes the DOM Element to point the bubble at.
- When I use document.getElementsByClassName() on a Custom Component's Elements or on a Salesforce Standard Element (like the Navigation Menu) it works the same, I get an HTML Collection but if I try to get the first record document.getElementsByClassName()[0] it works for Custom Component's Elements but for Standard Elements I get undefined.
- I learned Lightning Locker Service prevents Lightning Components from reaching DOM Elements in differen Namespaces.
- It still returns a Proxy Object and I am able to use that Proxy Object to get the Element of other Custom Components but for Standard Elements I get undefined.
- Is there anyway to get the DOM Element of a Standard Salesforce Community Component?