Bug 921808: Check DOM state before setting styles/content during load

See:  https://bugzilla.mozilla.org/show_bug.cgi?id=921808