Andrew Eberhard wrote:
Hi Eric,
Well, I'm getting underway with Safari-enabling my AJAX project [using the latest nightly build ;-) ] and I've run into a problem that seems to be "as designed" but I wanted to run it by everyone first. Basically, Document.load is not supported in Safari. I assume that I can use XMLHttpRequest instead, but http://bugzilla.opendarwin.org/show_bug.cgi?id=5411 led me to think that there might be reason to enter a bug on Document.load support. Since Sarissa currently relies on Document.load for SarissaDoc.load, I wasn't sure if bug #5411 was intended to include Document.load support in Safari or if the folks at Sarissa should be asked to update it to work with Safari's XmlHttpRequest approach.
There is a bit of prior research on this subject at http://www.xs4all.nl/~zanstra/inTec/safariIdea.htm.
Hi Andrew. The Sarissa folks are taking a look at it. It's actually possible to work around the bug, I believe. Here is what triggers the bug: var oldDoc = document.implementation.createDocument("", "", null); (Note: This is against the Sarissa CVS HEAD.) Creating a document with a real node name for the document element, though, works: var oldDoc = document.implementation.createDocument("", "foo", null); Hmm, come to think of it, this works as well: var oldDoc = document.implementation.createDocument("", null, null); Anyway, my guess is that your application can be made to work with a patched Sarissa. I *think* (but I'm not sure) that the qualified name (2nd arg) should either be a real node name or null. In which case, WebKit is right and we need to change Sarissa. --Paul