Thank you. I was looking at a generic way to pass configuration data to custom elements where I cannot know the shape in advance, since another dev can have different requirements. I support data attributes for simple types but i was wondering if allowing arbitraty json objects via other means could be feasible.
hunter2_|6 months ago
[0] https://stackoverflow.com/questions/17124713/read-response-o...
lioeters|6 months ago
Safe JSON in script tags: How not to break a site - https://sirre.al/2025/08/06/safe-json-in-script-tags-how-not...
As with all untrusted content, depending on where the JSON string comes from, sanitizing the output is worth considering.