WebReflection / hyperHTML

A Fast & Light Virtual DOM Alternative
ISC License
3.07k stars 112 forks source link

colspan is not working properly in IE11 #205

Closed judge closed 6 years ago

judge commented 6 years ago

Hi,

We tried to build a table with hyperHTML and we would like to add dynamic colspan to one of our td elements. It works fine in Chrome, Firefox and Edge, but we got an error in IE11: Member not found.

We created a pen: https://codepen.io/jdg/pen/eVXKPx (please open it in IE11).

Could you please check this? Thanks!

sourcegr commented 6 years ago

oh that damn browser :(

pinguxx commented 6 years ago

try with colSpan

WebReflection commented 6 years ago

Hi @judge , can you actually follow @pinguxx hint and tell me if the following would work ?

<td colSpan=${options.colspan}>hello</td>

note the camelCase colSpan in the template.

If that's the case I'm afraid there's not much I can do because unless I implement a dictionary of every single attribute that might have a camelCase equivalent for IE11 only it's hard to randomly guess camelCases and exponentially a no-go for performance.

If that's not the case though, I'll try to figure out how to solve this extra shenanigan .

Thanks for your patience (I don't have IE11 with me right now, you might be faster in trying)

judge commented 6 years ago

Yes, colSpan works, thanks @pinguxx and @WebReflection ! This should be included in the documentation (somehow, I know it's a guess game mostly), I could not find it.