AEMaaCS- selector accessed in JS | Community
Skip to main content
Level 9
May 28, 2024
Question

AEMaaCS- selector accessed in JS

  • May 28, 2024
  • 1 reply
  • 508 views

All,

is there a way other than splitting url that one can access url in client library js alone ? I could do via models but want script to obtain it vs backend model 
eg http://localhost:4502/text/test2.abc.html

since I don’t believe I can get selectors directly within client library js passing using below option 

 I get the selector in htl and add a script in htl itself setting it to a variable, hoping I can get it in js 

or 

set it in a var id within data-sly-use 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

rishim22446870
Adobe Employee
Adobe Employee
December 3, 2024

Could you elaborate more on the use-case ? You could use data-sly-use to pass server-side values into JavaScript.