Categories
General

Safari Issues, part 1

After working on ensuring the site I am developing for my current project is compliant with Safari, I collected a bunch of experiences that I should share for posterity. Most of them have to do with the fact that Safari, based on the same KTML browser core as the KDE project’s Konqueror browser, seems to never have improved on the original KTML version’s JavaScript engine, while Konqueror did. Safari, like a slab of rock and a chisel, is still eons ahead of Opera, but that’s a different story.

So, let’s bitch about Safari.

The problem I had with Safari today has to do with the fact that in order to save a lot of unnecessary code specifying onclick events, I am instead assigning the events to links on the page dynamically when the page loads. For example, what I do is iterate over the links in a table, and then assign them a function to be called when they are clicked:

var tableLinks = myTable.getElementsByTagName(“a”);
for(var x=0; x < tableLinks.length; x++) { tableLinks[x].onclick = function() { doSomething(); }; } When certain conditions are met, I want to assign a different event handler function to one of these links, which I assign the same way: link.onclick = function() { doSomethingElse() }; But with Safari, no. Once you set one event on a link, it is there to stay. Boo freakin' hoo. Apple support pages proclaim the standards compliance but for real action, give me IE over Safari anyday. If you are lucky enough to use an Apple machine, just use Firefox. (This will be my standard endnote for every Safari bitch. I know you care.)

Share
Share