AOL WebMail uses Polished Dojo
AOL’s new beta webmail application was released yesterday to much fanfare. I was very pleased to see it utilizing dojo for all of it’s client side richness.
It’s finally nice to have some big name examples that can be used when people say “who else uses this Dojo thing I’ve never heard of”. It has alwyas been easy to rattle off a list of big corporations on the dojo contributor or backing list, but having an actual business critical large scale old economy application built from it is a great reinforcer of how established it is, even at it’s infant 0.4 stage of life.
A good friend and client colleague, James Wiltshire - of JSON Tag Lib Fame, pointed out that it appeared the AOL was doing an interesting Dojo fix system.
They call a Dojofixes module within their WS namespace.
The file they actually load can be seen here:
http://ro-r01.webmail.aol.com/23921/js/ws/dojofixes.js
It includes:
- Fix to the widget parse to reduce the recursion that would cripple Safari - dojo.widget.getParser().xcreateComponents
This is an iterative replacement of Dojo’s recursive createComponents function, to avoid overflowing Safari’s tiny stack. The original implementation calls createSubComponents, which recursively calls createComponents. To make it iterative:
1) Inlined the call to createSubComponents
2) Replaced the recursive call with a list of frags to process
- A couple of fixes for some positioning bugs:
dojo.html.setPositivePixelValue
Fixed version of getAbsolutePosition that uses dojo.doc() instead of document, so it can reach into iframes. Should be in Dojo 0.5.
- A fix to rendered text objects:
dojo.html.renderedTextContent
- A fix for Dojo bug 1858 (PopupContainer widget causes exception on unload)
dojo.widget.html.layout
- A fix to the PageContainer widget’s fillInTemplate prototype:
This is needed for IE6. It treats width like min-width, so if the PageContainer has a child that’s bigger than the PageContainer, then getContentBox on the PageContainer will return the larger size. Thus the PageContainer will never shrink the child to the right size. overflow:hidden fixes this.
- A workaround for Dojo bug 2391 (which is now fixed in head).
Menu2.css doesn’t get interned correctly, so we intern it here and then copy it to PopupMenu2. Should be fixed in Dojo 0.4.2.
And a couple of hacks to reduce unneeded widget layout calls.
resizeTo and checkSize call onResized only if isShowing returns true.. but as documented in isShowing, it can return true even if one of the ancestor widgets is hidden. So we replace isShowing with isReallyShowing, which returns true only if all the ancestor widgets are showing.
It’s an interesting list, to see which bugs and quirks with the Dojo code has had the most impact on AOL’s needs. The fact that this file only covers half a dozen things is really a great testament to how mature Dojo is already.
About this entry
You’re currently reading “AOL WebMail uses Polished Dojo,” an entry on jpsykes
- Published:
- 03.06.07 / 9pm
- Category:
- Uncategorized









1 Comment
Jump to comment form | comments rss [?] | trackback uri [?]