docs: function fixWebcomponentsElement (element) {
    if (typeof window.ShadowDOMPolyfill !== 'undefined') {
  
      const is_native = document.defaultView.getComputedStyle
        .toString().indexOf('[native code]') !== -1;
  
      // Can't check if element is instance of HTMLElement, because the polyfill
      // hijacks this. Only reliable way of checking if it is wrapped I found
      // is using this ugly ass property.
      const is_wrapped = typeof element.__impl4cf1e782hg__ !== 'undefined';
  
      if (is_native && is_wrapped) {
        element = window.ShadowDOMPolyfill.unwrap(element);
      }
  
      if (!is_native && !is_wrapped) {
        element = window.ShadowDOMPolyfill.wrap(element);
      }
    }
  
    return element;
  }