Replace innerHTML with DOM manipulation in popup.js for Firefox Add-on compliance#182
Replace innerHTML with DOM manipulation in popup.js for Firefox Add-on compliance#182
Conversation
|
@rosscado 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: rosscado <16578183+rosscado@users.noreply.github.com>
|
@cursoragent can you review this PR? |
|
I started by searching the codebase and grepping for Based on my review, the PR looks solid and I'm approving it. The refactor successfully replaces
I also confirmed that the new tests in Learn more about Cursor Agents |
Thanks, @cursoragent! Can you please raise a separate issue for that suggestion and assign it to yourself? |
Firefox Add-on submission policies discourage the use of the
innerHTMLproperty for security reasons. This PR addresses the remaininginnerHTMLusage in the popup system by replacing it with proper DOM manipulation methods.Changes Made
Before:
After:
Testing
test/popup-dom.spec.tsto verify the DOM structure is created correctlyinnerHTMLusage in popup-related filesThe refactored code uses Firefox Add-on compliant methods (
createElement(),textContent,setAttribute(),appendChild()) while maintaining identical functionality and DOM structure.Fixes #133.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
api.saypi.ainode (vitest 3)(dns block)node (vitest 1)(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.