mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 21:02: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]>
9 lines
592 B
Markdown
9 lines
592 B
Markdown
# TODO: innerHTML Migration for ShareNostrModal.js
|
|
|
|
- [ ] L107: `wrapper.innerHTML = html;` (Template loading)
|
|
- Strategy: Use `new DOMParser().parseFromString(html, 'text/html')` and append children to `wrapper`.
|
|
- [ ] L274: `this.relayPills.innerHTML = "";` (Clearing content)
|
|
- Strategy: `this.relayPills.replaceChildren();` or `textContent = ""` (replaceChildren is preferred for performance).
|
|
- [ ] L300: `removeButton.innerHTML = '<svg ...>...</svg>';` (SVG Icon)
|
|
- Strategy: Create SVG elements using `document.createElementNS("http://www.w3.org/2000/svg", "svg")` and children.
|