XML News from Thursday, July 16, 2009

Apple has released Safari 4.0.2 for Mac and Windows, and I have made the switch. Bye Bye Firefox. It's been nice knowing you, but you denied and ignored my critical bugs for too long. Safari supports XML 1.0, XSLT 1.0, CSS, XHTML, SVG 1.1, and RSS. The final missing pieces that enabled me to switch were DeliciousSafari, Safari AdBlock, View Selection Source, and this bit of AppleScript:

tell application "Safari"
	set selecTxt to (do JavaScript "(getSelection())" in document 1)	
	set theURL to URL of tab 1 of front window
	set title to name of tab 1 of front window
end tell

Calling JavaScript from AppleScript to get the selection is definitely a hack; but it works. I do wish web browsers would provide easier programmatic access to the DOM from AppleScript and also the standard text suite though. I'd also love more metadata about the page--author, date, and so forth--but this at least moves Safari to parity with Firefox 2, and way beyond Firefox 3.

I still need replacements for CookieSafe and CustomizeGoogle, but I can live without those for now. Oh, and one more thing, could someone please make Safari restore its state after quit/crash and relaunch? "History/Reopen All Windows from Last Session" is close, but not quite right.