4 ms·
> Cross-browser compatibility is often the reason "good code" turns into messy code! I think that too depends on how you code it. You can code mechanics, or yo
by bashzor 14y ago
> Cross-browser compatibility is often the reason "good code" turns into messy code!
I think that too depends on how you code it. You can code mechanics, or you can code logic (quoting an earlier blogpost title which was also on HN).
var hr = new httprequest(); //Where the httprequest function is defined elsewhere
versus 10 lines of code right here to support all browsers since IE5 or so. This might be even more readable as when you'd only write it for one browser.
(I couldn't think of a similar example in css.)