-
I have not tested Surreal yet, I wondered if it makes selecting web components easier ? Right now I have to drill down through multiple levels of shadowroot in my new project... |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Unfortunately I haven't tried this yet, but if anyone has, please share your experiences. |
Beta Was this translation helpful? Give feedback.
-
Right now I'm using valilla js to select a 3rd-level web component with Unfortunately it's not possible to select directly 'lightning-formatted-url', as it's hidden under previous shadowRoots. I can't either put some code on any sub element - I'm afraid I have to start from document. Is there a clever way to handle this with Surreal ? |
Beta Was this translation helpful? Give feedback.
-
While writing my previous message, I realized that I can cut this big elephant into chunks, so I came with
which works, so I can set the htmx attrbutes I need on this However the gain of readability seems quite marginal compared to the vanilla way to traverse the tree. Is there an elegant way to chain elements, such as (here I'm trying to use the super-amazing Avonni elements, further extending the amazing Salesforce components. Much, much more complete than recent component libraries... - but using them outside Salesforce environment and teaching them htmx is quite an exercise) |
Beta Was this translation helpful? Give feedback.
-
Not an issue anymore, I ran away from this Salesforce design system and happily found and use Vaadin web components, which work well with htmx and surreal 😄 and don't mess with shadowRoot. |
Beta Was this translation helpful? Give feedback.
Not an issue anymore, I ran away from this Salesforce design system and happily found and use Vaadin web components, which work well with htmx and surreal 😄 and don't mess with shadowRoot.
Problem solved! Thanks for the library!