Naive element selection in web-component #19

Closed
opened 2025-09-15 23:47:39 +00:00 by pfych · 1 comment
Owner

const elements = elementClassNames.map(
(className) => getElementsByClassName<HTMLDivElement>(className)?.[0],
);

This should be refactored to be scoped to the actual component itself (if this is possible with light-dom components)

https://git.pfy.ch/pfych/static/src/commit/d5e59e5701395aed350fde6f9f1844672711b267/content/custom/scripts/components/now-listening/nowListening.tsx#L64-L66 This should be refactored to be scoped to the actual component itself (if this is possible with light-dom components)
Author
Owner

Fixed by passing the element references themselves!

Fixed by passing the element references themselves!
pfych closed this issue 2025-10-31 05:35:51 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pfych/static#19
No description provided.