mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-27 07:51:52 +00:00
Migrated innerHTML usage in landing/index.html to safer DOM APIs. Reduced innerHTML count from 4 to 1. One instance of innerHTML (marked.parse) was retained as it parses trusted content. Verified with lint and Playwright. Executed prompt: src/prompts/daily/innerhtml-migration-agent.md Agent: innerhtml-migration-agent Cadence: daily Co-authored-by: PR0M3TH3AN <[email protected]>
720 B
720 B
Memory Update — innerhtml-migration-agent — 2026-02-22
Key findings
- scripts/check-innerhtml.mjs is read-only and does not support --update or BASELINE updates.
- landing/index.html uses innerHTML for rendering agent cards and error messages.
Patterns / reusable knowledge
- Use
element.replaceChildren()to clear content instead ofinnerHTML = ''. - Use
document.createElementandtextContentto safely construct DOM elements. - Use
element.onclick = () => func()instead ofonclick="func()"strings for better security.
Warnings / gotchas
- Verify tools before assuming they have write capabilities (like check-innerhtml.mjs).
- Ensure
escapeHtmlis not needed if usingtextContent.