Dojo support. A bit hackish, but works