Text nodes can't accept properties in IE8
See original GitHub issueHi guys!
First of all, thanks for you work, this library is awesome!
I know that IE8 is not officialy supported, but i have to and in your ‘Browser support’ page you say:
It should work fine in IE7 and IE8
I’ve fixed it locally with this patch:
let supportsAddTextNodeProps;
try {
document.createTextNode('').test = true;
supportsAddTextNodeProps = true;
} catch (e) {
supportsAddTextNodeProps = false;
}
function getEmptyVNode() {
if (!supportsAddTextNodeProps) {
return document.createElement('p-empty');
}
return '';
}
// empty values (null & undefined) render as empty Text nodes
if (vnode==null) vnode = getEmptyVNode();
So, can we fix it?
Or at least, can you remove "It should work fine in IE7 and IE8"
?
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Text nodes can't accept properties in IE8 · Issue #537 - GitHub
Hi guys! First of all, thanks for you work, this library is awesome! ... // empty values (null & undefined) render as empty...
Read more >html - Inconsistent Whitespace Text Nodes in Internet Explorer
The solution is to skip text nodes in all browsers: var node = element.firstChild; while(node && node.nodeType == 3) node = node.nextSibling;. Popular ......
Read more >The poor, misunderstood innerText - Perfection Kills
If the node is a Text node: 1. If the CSS "white-space" property of node's parent is "normal": Let collapsed_s be the value...
Read more >Using aria-labelledby to concatenate a label from several text ...
So adding the aria-labelledby property to a native label should replace the text content inside that label unless the label itself is referenced...
Read more >Process Model Object - Appian 20.4
Description: This line lists any descriptive text entered for the activity on the general tab of the node properties dialog box. Task Display...
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
I’ve rapidly made the fix here
If it’s ok tomorrow i’ll do the PR.
Thanks for the support 😃
Anyone looking for a workaround, here’s how to get Preact working (reasonably enough) in IE7 and IE8:
This fixes the text node properties issue. It causes text nodes to be recreated on every render, but that’s the price we pay 😃