if isinstance(document, ChildDocument) and document.GetParentDocument() == parentDocument:
if document.GetFirstView().GetFrame():
document.GetFirstView().GetFrame().SetFocus()
if isinstance(document, ChildDocument) and document.GetParentDocument() == parentDocument:
if document.GetFirstView().GetFrame():
document.GetFirstView().GetFrame().SetFocus()