dfilatov / vidom

Library to build UI based on virtual DOM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IE 11, [object Object] in style attribute

Urkass opened this issue · comments

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?

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.

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