mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +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]>
592 B
592 B
TODO: innerHTML Migration for ShareNostrModal.js
- L107:
wrapper.innerHTML = html;(Template loading)- Strategy: Use
new DOMParser().parseFromString(html, 'text/html')and append children towrapper.
- Strategy: Use
- L274:
this.relayPills.innerHTML = "";(Clearing content)- Strategy:
this.relayPills.replaceChildren();ortextContent = ""(replaceChildren is preferred for performance).
- Strategy:
- L300:
removeButton.innerHTML = '<svg ...>...</svg>';(SVG Icon)- Strategy: Create SVG elements using
document.createElementNS("http://www.w3.org/2000/svg", "svg")and children.
- Strategy: Create SVG elements using