Replace innerHTML properties with textContext?
See original GitHub issueHi, thanks for the great work on Tippy! I have a bit of a niche request.
With the Mozilla web-ext lint tool, Trippy triggers a few UNSAFE_VAR_ASSIGNMENT warnings. These can revoke WebExtensions that include the Tippy dist from being submitted to the Mozilla Addons page.
If there are no conflicts the fix is pretty easy. Where an innerHTML property is used to set a string value, replace these with the textContent property.
content.innerHTML = title; > content.textContent = title;
Mozilla suggests as textContent is not parsed, it’s faster and also avoids potential XSS attacks.

Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
nodeValue vs innerHTML and textContent. How to choose?
The two I know well and work with are innerHTML and textContent. I use textContent when I just want to change the text...
Read more >Element.innerHTML - Web APIs | MDN
The innerHTML property can be used to examine the current HTML source of the page, including any changes that have been made since...
Read more >How to Replace Text Inside a div Element with JavaScript?
One way to replace the text inside a div element with JavaScript is to set the innerHTML property of an element to a...
Read more >JavaScript innerHTML, innerText, and textContent - Medium
The innerHTML property returns the text, spacing, and inner HTML element tags. ... innerText returns: "This element has extra spacing and contains a...
Read more >textContent vs innerHTML in the JavaScript DOM - YouTube
Although commonly used interchangeably, there is a major difference between the textContent and innerHTML properties when working with ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

2.3.0(unminified though)https://github.com/atomiks/tippyjs/pull/307 should fix the problem.