0

Requirement: My controller code should be able to navigate through the DOM (of the whole page, not just the wrapping component), locate elements and add overlay (like tooltips) on identified elements. Since my code is going to run inside my custom lightning component's scope, I guess it cannot gain access to the elements outside the component itself, but I am hoping someone could prove me wrong. ;) Here is an example use-case: the controller code of my component embedded on the Lightning homepage must locate the Home tab in the standard Lightning Navbar and add a tooltip there.

I know this can be done using a browser extension and there are third party apps available for the tool-tip use-case, but I am trying to find if there is a way to implement it using a lightning component. Please let me know if this is possible. If not, what are some alternatives worth exploring?

Thank you!

  • FYI, Lockerservice was introduced to prevent this. – tsalb Apr 14 at 7:16
0

No, there's no way to circumvent the Shadow DOM. Even if there was, it would only have been a bug that would need to be fixed. You'll need to resort to extensions if you want to have this kind of feature.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.