mattdesl / dom-css

fast dom CSS styling
MIT License
152 stars 13 forks source link

robustness for IE8 #15

Closed houmingjie closed 7 years ago

houmingjie commented 7 years ago

if value is invalid ( NaN ) : IE8 will throw an exception,other browser just ignore it and do nothing

mattdesl commented 7 years ago

Hmm there must be a way to fix this without try/catch... Is it just that value cannot be NaN?

houmingjie commented 7 years ago

Not only NaN. It seemed to be all invalid format will cause an exception in IE8.

eg. document.getElementById("app").style.borderColor = 'redd'

houmingjie commented 7 years ago

I see your point. May be it's better to handle invalid value before call this lib. Close this PR. :)