mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-05 12:22:28 +00:00
- Replace template `innerHTML` with `DOMParser` - Replace SVG `innerHTML` with `createElementNS` - Replace `innerHTML = ""` with `replaceChildren()` - Update `check-innerhtml` baseline Co-authored-by: PR0M3TH3AN <[email protected]>
25 lines
857 B
Markdown
25 lines
857 B
Markdown
# innerHTML Migration Task: ShareNostrModal.js
|
|
|
|
**Date:** 2026-02-20
|
|
**Agent:** innerhtml-migration-agent
|
|
**Status:** Completed
|
|
|
|
## Migrated File
|
|
* `js/ui/components/ShareNostrModal.js` (3 innerHTML assignments migrated)
|
|
|
|
## Changes
|
|
1. **Template Loading:** Replaced `wrapper.innerHTML = html` with `DOMParser` logic.
|
|
2. **Clearing Content:** Replaced `this.relayPills.innerHTML = ""` with `replaceChildren()`.
|
|
3. **SVG Icon:** Replaced `removeButton.innerHTML = SVG` with `createElementNS`.
|
|
|
|
## Verification
|
|
* `npm run lint` passed.
|
|
* `npm run test:unit` passed.
|
|
* `node scripts/check-innerhtml.mjs --report` confirmed count reduction (3 -> 0 for this file).
|
|
* `scripts/check-innerhtml.mjs` baseline updated.
|
|
|
|
## Artifacts
|
|
* `context/CONTEXT_2026-02-20_innerhtml.md`
|
|
* `todo/TODO_2026-02-20_innerhtml.md`
|
|
* `decisions/DECISIONS_2026-02-20_innerhtml.md`
|