D
David Mark
I see this getting discussed to death until the end of time.
1. Unlike other modern browsers, IE does not have any way to retrieve
computed styles
2. IE does have a way to retrieve cascaded styles
3. A wrapper to smooth this over is easy, but will only be consistent
for a subset of rules and cases.
4. Shortcuts (e.g. margin, padding) aren't in the consistent subset
(for any cases.)
I would think that #4 would be obvious as passing a shortcut to
getComputedStyle makes no sense at all. Yes, some browsers will give
it their best shot, but that is their problem. Just don't do it.
Of course...
http://groups.google.com/group/jquery-dev/browse_thread/thread/eb564e528ac8933d#
Yes, as usual, jQuery takes an inconsistency and turns it into a
disaster (an exception.) Rather than pointing out the inherent
pointlessness of these cases, the developers are trying to come up
with new magic spells. They'll be back to sniffing the UA string
before you know it.
Also as usual, the root of the problem is sloppy code. You'd think
these guys would tire of tripping over bugs. These broken functions
(all of them?) aren't very long or complicated (or fast, efficient,
readable, etc.), yet here's this entire sub-culture refusing to read
and understand the code they rely on every day. Where are the "many
eyes" that ostensibly view this "well tested" BS every day? Wasn't
that the argument four years ago?
What I want to know is who is paying these neophytes to ponder old
problems created by scripts they chose and to ignore all of the issues
that could easily be fixed (or avoided.) The amount of time spent
going around in circles in those jQuery forums is obscene. Then there
are the upgrades and testing reboots every few months. All because
the equally clueless developers could never quite figure out "browser
magic" and the users are sure that jQuery is the only way to counter
it. There must be some way to communicate to these people that they
have everything backwards.
Nobody over there seems interested in the - attr - method's futility
either. It's like there is something in the water. Or maybe it is
all the bad books?
1. Unlike other modern browsers, IE does not have any way to retrieve
computed styles
2. IE does have a way to retrieve cascaded styles
3. A wrapper to smooth this over is easy, but will only be consistent
for a subset of rules and cases.
4. Shortcuts (e.g. margin, padding) aren't in the consistent subset
(for any cases.)
I would think that #4 would be obvious as passing a shortcut to
getComputedStyle makes no sense at all. Yes, some browsers will give
it their best shot, but that is their problem. Just don't do it.
Of course...
http://groups.google.com/group/jquery-dev/browse_thread/thread/eb564e528ac8933d#
Yes, as usual, jQuery takes an inconsistency and turns it into a
disaster (an exception.) Rather than pointing out the inherent
pointlessness of these cases, the developers are trying to come up
with new magic spells. They'll be back to sniffing the UA string
before you know it.
Also as usual, the root of the problem is sloppy code. You'd think
these guys would tire of tripping over bugs. These broken functions
(all of them?) aren't very long or complicated (or fast, efficient,
readable, etc.), yet here's this entire sub-culture refusing to read
and understand the code they rely on every day. Where are the "many
eyes" that ostensibly view this "well tested" BS every day? Wasn't
that the argument four years ago?
What I want to know is who is paying these neophytes to ponder old
problems created by scripts they chose and to ignore all of the issues
that could easily be fixed (or avoided.) The amount of time spent
going around in circles in those jQuery forums is obscene. Then there
are the upgrades and testing reboots every few months. All because
the equally clueless developers could never quite figure out "browser
magic" and the users are sure that jQuery is the only way to counter
it. There must be some way to communicate to these people that they
have everything backwards.
Nobody over there seems interested in the - attr - method's futility
either. It's like there is something in the water. Or maybe it is
all the bad books?