zerodevx / zero-md

Ridiculously simple zero-config markdown displayer
https://zerodevx.github.io/zero-md/
ISC License
437 stars 48 forks source link

Can't set `no-shadow` globally #120

Closed zerodevx closed 2 months ago

zerodevx commented 2 months ago

This should work but doesn't:

<head>
  <script type="module">
    import ZeroMd from 'https://cdn.jsdelivr.net/npm/zero-md@3'
    customElements.define('zero-md', class extends ZeroMd {
      async load() {
        await super.load()
        this.setAttribute('no-shadow', '')
      }
    })
  </script>
</head>
<body>
  <zero-md src="https://example.com/markdown.md"></zero-md>
</body>