Skip to content

Conversation

smeijer
Copy link
Member

@smeijer smeijer commented May 31, 2020

The type attribute for script elements is optional, and defaults to text/javascript.

This PR add's support for untyped script elements in embed templates.

The following two examples, are now treated equal:

<template data-testing-playground>
  <script type="text/html">
    <button>one</button>
  </script>

  <script type="text/javascript">
    screen.getByRole('button');
  </script>
</template>
<template data-testing-playground>
  <script type="text/html">
    <button>one</button>
  </script>

  <script>
    screen.getByRole('button');
  </script>
</template>

@smeijer smeijer self-assigned this May 31, 2020
@smeijer smeijer added the feature New feature or request label May 31, 2020
@smeijer smeijer changed the title feat: support script elements without type attribute in embed templates feat: support template > script elements without type attribute May 31, 2020
@smeijer smeijer merged commit 689a66c into develop May 31, 2020
@smeijer smeijer deleted the feature/fix-embed branch May 31, 2020 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant