JSFiddle - React, Tailwind, and code Playground

by Hemanth HM

HTML

<script>
  function handleLoad(e) {
    console.log('Loaded import: ' + e.target.href);
  }

  function handleError(e) {
    console.log('Error loading import: ' + e.target.href);
  }
</script>

<link rel="import" href="/gnumanth/H6NDu/" onload="handleLoad(event)" onerror="handleError(event)" />

<script>
      const link = document.querySelector('link[rel=import]');
    const xkcd = link.import;
    // Access DOM of the document in aweTemplate
    const cartoon = xkcd.querySelector('img');
    console.log(cartoon);
</script>