Added support for HTML documents with the designMode flag set.