Skip to main content
Level 9
May 28, 2024
Pregunta

AEMaaCS- selector accessed in JS

  • May 28, 2024
  • 1 respuesta
  • 518 visualizaciones

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 

 

Este tema ha sido cerrado para respuestas.

1 respuesta

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.