HTML5-Progress-polyfill icon indicating copy to clipboard operation
HTML5-Progress-polyfill copied to clipboard

One less IE bug...

Open kbjr opened this issue 13 years ago • 3 comments

I fixed the test "get max attribute, when attribute is 0" in IE8. Its a fairly hackish fix (okay... its a very hackish fix), but it seems to work and I haven't seen that it causes any new problems in IE or other browsers.

Also, I made it so that the script automatically includes the stylesheet only if its needed (instead of always having users put it in the head). You may or may not like that change, it seemed to make sense to me, but feel free to get rid of it if you don't like it :)

kbjr avatar Jul 02 '11 20:07 kbjr

I thought about conditionally including the stylesheet too, but didn't like the idea of the user having to edit the js file to change it. Also, what if they want to merge it with other stylesheets to avoid extra HTTP requests? That's personal preference, but imho having to add an extra tag for that much more flexibility is not a big tradeoff.

Also, I'm not a huge fan of recreating the progress element. It's too intrusive. For example, there's no way to copy event handlers, which is quite important. So, for now, I'm not going to merge this pull request (unless someone has a good argument for it, which is why I'm not closing it either), but kudos on the nice work discovering this fix!

LeaVerou avatar Jul 02 '11 23:07 LeaVerou

Oh, no, I was experimenting with creating new progress elements, but I didn't like it much myself, either. In the end, I replaced the getAttribute() method on the placeholder tag with one that is able to get the missing attribute.

kbjr avatar Jul 03 '11 01:07 kbjr

That's a very interesting idea indeed. I'll need to experiment with it a bit first, to see if it can be done in a more compact way (and give you credit of course, even if ends up being my commit). Thanks!

LeaVerou avatar Jul 03 '11 03:07 LeaVerou