innerHTML broken for some frameworks
See original GitHub issueFor React, React Native, Vue, and Angular there are two sets of quotes.
For Svelte it should use @html
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
javascript - .InnerHTML Not working properly in Internet Explorer
innerHTML won't work in IE, but using DOM methods it will: function getValue() { var x=document.getElementById("myHeader") , link = document.
Read more >innerHTML works in Firefox but not in Chrome : r/javascript
This attribute ( innerHTML ) is very basic and works in Chrome like it does in FF. It would be interesting to know...
Read more >What is the Disadvantage of using innerHTML in JavaScript
But there are some disadvantages to using innerHTML in JavaScript. ... Even broken HTML can be used, which may lead to unexpected problems....
Read more >Triggering Actions Inside InnerHTML Content | by David Geller
Directly connecting content within innerHTML areas with functions that normally respond to Ionic Framework pages isn't immediately obvious. So, ...
Read more >Adding same spfx webpart(no javascript framework) with ...
innerHTML = html;. And likewise, change the line in your else condition to linksDiv.innerHTML = "No users in the Active Directory Group";.
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 FreeTop 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
Top GitHub Comments
Sure
Thanks for raising this bug @sachinraja 🙏🏽.
If you (or anyone else) are interested in contributing a fix for this, here is some context pointing out how to do so:
Here is where
innerHTML
is handled in the react generator:https://github.com/BuilderIO/mitosis/blob/85ed03dd886ffe258974dda619c313eff9893354/packages/core/src/generators/react.ts#L90-L99
All that needs to be done is adjust the logic here to handle the quotes properly. Afterwards, a similar change will need to be applied to the other frameworks. In some cases, frameworks might not yet have a
BINDING_MAPPERS
object, so that might have to be added from scratch