On Jan 28, 2006, at 11:49 AM, Bob Ippolito wrote:



On Jan 27, 2006, at 5:59 AM, Eoghan wrote:


I've got a patch for this, mozilla wasn't going down the
createelementns path because the value of the namespaceURI is
"http://www.w3.org/1999/xhtml"; for true xhtml documents (those not
served as text/html)... appending the child <script> tag the dom way is
of course cool and works fine in xhtml!

I've just posted the modified portion of (the end of) Mochikit.js
below... just 3 lines changed, should I create a trac item for this?

I went with a slightly different approach, which uses createElement ("script") even on Safari. The problem is that Safari's setAttribute doesn't work correctly for script tags, so I just went with setting the properties directly. I had meant to fix that a while ago.

I'm going to revert this and change the doctypes for the examples to HTML4. The problem is that Safari does deferred script loading when you add a script tag via DOM... even if I redesigned MochiKit itself to deal with deferred loading, it would break user code because MochiKit won't necessarily be available immediately for use by other script tags in the document.

If you want valid XHTML you must use the packed version, or include each script individually. XUL is fine with MochiKit.js, though.

-bob

Reply via email to