google / playground-elements

Serverless coding environments for the web.
BSD 3-Clause "New" or "Revised" License
549 stars 55 forks source link

Using "selected" doens't load initially the contents of the tab if is not specified first. #388

Open tomasts248 opened 11 months ago

tomasts248 commented 11 months ago

This happens with more than one tab and when the selected tab is not the first one specified as a "script" such as in this case example:

<script type="sample/html" filename="index.html">
  <!doctype html>
  <html>
    <head>
      <link rel="stylesheet" href="mi-hoja-de-estilos.css">
    </head>
    <body>
       <h1>Ok..</h1>
    </body>
  </html>
  </script>
  <script selected type="sample/css" filename="mi-hoja-de-estilos.css">

In this case on initial load the HTML content is displayed first, when instead it should display the CSS tab. Quick workaround is swaping those script tags.