function focusParent() {
  try {
    window.open('', 'parent');
  } catch (err) {
    console.log('err', err);
  }
}
Switch focus to the parent window. This requires that the parent runs
`window.name = 'parent'` before opening the popup.