src/execute-js-func.js
function findTargetFromParentInfo(parentInfo=window.parentInfo) {
  if (!parentInfo) return null;
  if ('guestInstanceId' in parentInfo) {
    return require('electron').remote.getGuestWebContents(parentInfo.guestInstanceId);
  }

  if ('webContentsId' in parentInfo) {
    return webContents.fromId(parentInfo.webContentsId);
  }

  return null;
}
function findTargetFromParentInfo(parentInfo=window.parentInfo) {
  if (!parentInfo) return null;
  if ('guestInstanceId' in parentInfo) {
    return require('electron').remote.getGuestWebContents(parentInfo.guestInstanceId);
  }

  if ('webContentsId' in parentInfo) {
    return webContents.fromId(parentInfo.webContentsId);
  }

  return null;
}
Given the parentInfo returned from {getSenderIdentifier}, returns the actual
WebContents that it represents.

@param  {object} parentInfo  The renderer process identifying info.

@return {WebContents}        An actual Renderer Process object.

@private