5 ms·
Security through... obsolescence? =)
by rrival 19y ago
Security through... obsolescence? =)
- SwellJoe 19y agoThe last time pg had to do design work or perish (figuratively speaking) was ten years ago. It'll take him a while to get up to speed on all this new-fangled technology. Besides, it works in all browsers, is reasonably accessible, and if it doesn't make him uncomfortable to work with it...why does anyone care?
- jkush 19y agoI think there's some fairly clever stuff going on. The page source is pretty simple (yes, I'm sure we've ALL looked at it at one point). Take this function for instance: function byId(id) { return document.getElementById(id); } My guess is that the function body is rendered differently for different browsers. If that's true, it's a clever way of doing cross browser Javascript.
- nostrademons 19y agodocument.getElementById is generally pretty portable across browsers. And another clever way of doing cross-browser JavaScript is just to use a mature JS library like Prototype or JQuery. They all give you byId for free, in the form of the $ function.
- jkush 19y agoI'm with you there - prototype is first class stuff. I wasn't sure if getElementById was supported by Opera or Safari. If it is, it looks like byId() is good way to save some typing.
- Hexstream 19y ago"it works in all browsers" Call me a fanboy, but I consider "works in <b>all</b> browsers" a misfeature. "works in all reasonably standards-compliant browsers" is a much better goal, I say. If people didn't support obsolete and/or mediocre software like that, we would all have had almost fully standards-compliant browsers 4 years ago.