code: function origin (node) {
    const ownWindow = ownerWindow(node)
  
    const { location } = ownWindow
  
  
    if (location.protocol === 'file:') {
      return '*'
    } else if (location.origin) {
      return location.origin
    } else if (location.port) {
      return `${location.protocol}//${location.hostname}:${location.port}`
    } else {
      return `${location.protocol}//${location.hostname}`
    }
  }
docs: Return the origin of the owner window of the DOM element
  
  see https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
  
  @param {DOMElement} node
  @returns {String} the origin