ck
      if (!supportsDetails()) {
        if (details.getAttribute('open')) {
          details.removeAttribute('open');
        } else {
          details.setAttribute('open', 'open');
        }
      }
    }

    if (!supportsDetails()) {
      details.classList.add('js-no-details-support');
    }

    summary.addEventListener('click', switchOpen, false);
  }());
</script>

<!-- for demo only -->
<div class="js-details-is-open"></div>
<div class="js-details-is-closed"></div>
