nextwebgen.com

The Next Generation Web Now

Pains of document.domain in FireFox 1.5

Filed under: Web 2.0 News, Front Page, JavaScript, Tip — Dion Almaer at 1:55 pm on Thursday, July 27, 2006

Alexander Kirk has written about a problem with XHR, responseXML and document.domain in FireFox:

This will work in IE, Safari, and Opera.
This will not work in Firefox 1.0. This is very awkward but at least it has been fixed in 1.5.
So it will work in Firefox 1.5. But:

The responseXML object is useless. You can’t access it, you receive a Permission Denied when trying to access it’s content (e.g. documentElement). Very annoying.
Even stranger that responseText is still readable. What’s the reason for this? Is there some security risk i am unaware of or is it a plain bug?

As the responseText is available there is a pretty simple fix: re-parse the XML, which is kinda stupid and cpu intense if you have a lot of them. (something like: var doc =
(new DOMParser()).parseFromString(req.responseText, “text/xml”);
)

Tuesday Morning Roundup

Filed under: Web 2.0 News, Front Page, JavaScript, Safari, Prototype, Ruby, Scriptaculous, RichTextWidget, Tip — Rob Sanheim at 9:00 am on Tuesday, July 11, 2006

Tuesday morning roundup!

  • Lesserwiki - a very light Ruby on Rails wiki very similiar to TiddlyWiki, with all updates done continuously on one page, double click to edit, etc.
  • Article on Writing Custom Iterators for Prototype from Encytemedia
  • A Prototype solution to the DOM Ready issue (see Dean's post for background info)
  • Javascript object < -> Rails object marshalling capability has been integrated into Protowidget - demo here, detailed explanation here - looks cool and could also function on its own.
  • An Ajax-ready slide transition library (demo) based on the popular Prototype/scriptaculous combo.
  • Reducing the perceived responsiveness of your app with the "W AJAX" design pattern - using background threads on the server to load complex data while the browser continues to load the easy stuff.
  • Safari hates trailing commas like this:
    new Effect.Highlight('foo', {duration:0.5,startcolor:'#ff99ff',});
    while FF and IE don't care. Bruce Williams has a quick and dirty Ruby test case to find offending scripts so you can catch it early in your build.

Sifl n Olly's Chester on his love skills. (mp3, probably NSFW)

updated: made title less stupid