dfilatov / vidom

Library to build UI based on virtual DOM
MIT License
415 stars 16 forks source link

IE 11, [object Object] in style attribute #316

Closed Urkass closed 7 years ago

Urkass commented 7 years ago

Es6 Map isn't fully supported in IE 11. This place of choosing the usage of es6 Map or SimpleMap leads to mistake: Here we try to fullfill es6-map throught the constructor, but map constructor arguments are not supported in ie, thats why it stays empty. And then trying to get 'style' property leads to nothing. When domAttrs('style').toString is called - native object's toString method is used, instead of stylePropToString, so it leads to '[object Object]'. I think it can be cured with some ponyfill like this, but it's up to you. What do you think?

dfilatov commented 7 years ago

I think we can better check for support of Map and fallback to the current polyfill for IE11. I'm going to investigate to this today.

dfilatov commented 7 years ago

@Urkass Thank you for the report and especially for your investigation to the source of problem, you've saved me a bit of time.