^^^^^
A lie.
^^^^^^^^^
Yet another typing error, probably.
And another thing. Why does it take over half a megabyte of javascript
to display a page of tutorial text ?
1. Most Web developers (and their managers) think browser scripting is
impossible (aw jeez, browsers are too buggy!)
2. These same people think that anybody who posts a JS library must be
an expert and they should put all of their faith into these Other Guy
(s) (AKA Ninjas).
3. They don't know or care how much their pages weigh, how slowly they
load or how many hapless users they've excluded. As long as it looks
good to them on their PC(s) (in the latest browsers), they figure they
have a pat hand.
It's getting worse now that IE8 is out, making it trivially easy to
write an app that "works" in IE8, but falls apart in IE < 8 (or in
compatibility mode). The "answer" for some is to exhort their users
to download FF (it's free after all!)
This site throws several exceptions off the bat in IE8 (and < 8 of
course) in any mode. They are using something called "Agile Ajax".
Copyright (c) 2007 Brian Dillard and Brad Neuberg:
Brian Dillard | Project Lead | (e-mail address removed) |
http://blogs.pathf.com/agileajax/
Brad Neuberg | Original Project Creator |
http://codinginparadise.org
Two guys who should have found another hobby.
window.dhtmlHistory = {
Of course. Everyone wants to write single-page sites. Or they did in
2007 anyway.
And why is this added to the window object?
/*Public: User-agent booleans*/
isIE: false,
isOpera: false,
isSafari: false,
isKonquerer: false,
isGecko: false,
isSupported: false,
....
var that = this;
/*set user-agent flags*/
var UA = navigator.userAgent.toLowerCase();
var platform = navigator.platform.toLowerCase();
var vendor = navigator.vendor || "";
if (vendor === "KDE") {
this.isKonqueror = true;
this.isSupported = false;
} else if (typeof window.opera !== "undefined") {
this.isOpera = true;
this.isSupported = true;
} else if (typeof document.all !== "undefined") {
this.isIE = true;
this.isSupported = true;
Sure. Anything with document.all is IE (and always will be).
} else if (vendor.indexOf("Apple Computer, Inc.") > -1) {
this.isSafari = true;
this.isSupported = (platform.indexOf("mac") > -1);
} else if (UA.indexOf("gecko") != -1) {
this.isGecko = true;
this.isSupported = true;
}
/*Add an unload listener for the page; this is needed for FF 1.5+
because this browser caches all dynamic updates to the
page, which can break some of our logic related to testing whether
this is the first instance a page has loaded or whether
it is being pulled from the cache*/
var unloadHandler = function() {
that.firstLoad = null;
};
this.addEventListener(window,'unload',unloadHandler);
In other words, their design is backwards and their implementation
incompetent. God only knows what the rest of the half meg holds.
I wonder who will go back and rewrite all of these dump sites? How
can developers think they are saving time by dumping every script they
can find into a site, no matter how dubious or inexplicable? If they
didn't understand them when the site was built, what will they do when
it breaks? I suppose they could contact the authors of the script
(s). But those are the people who caused the problems in the first
place. Maybe they have a clue two years later, but I can't see
counting on that. Or perhaps they can get an answer from their
similarly confused colleagues in the library "community". I'm sure
they'll know just what to do (upgrade dude, the _next_ version is
awesome!)