iframe object doesn't have a contentDocument.document property, contentDocument is sufficient. (on Firefox, not tested elsewhere)