ampproject / ampproject/amphtml

`<template>` without `type` not allowed

Open
#40,280 8 comments 0 reactions 1 assignee Claimed by @erwinmombay View on GitHub
Type: Bug
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

`amphtml-validator` will currently fail when a `` without a `type` is rendered with two errors:
1. The mandatory attribute 'type' is missing in tag 'template'.
2. The tag 'template' requires including the 'amp-mustache' extension JavaScript.

It's unclear from the [linked documentation](https://amp.dev/documentation/components/amp-mustache) why this is a validation error.

React uses `` to inform the browser to throttle rendering until that element is streamed in (see https://github.com/ampproject/amphtml/issues/40279).

### Reproduction Steps

Validate
```html












another page



```

### Relevant Logs

```shell
The mandatory attribute 'type' is missing in tag 'template'.
https://amp.dev/documentation/components/amp-mustache
The tag 'template' requires including the 'amp-mustache' extension JavaScript. https://amp.dev/documentation/components/amp-mustache
```

### Browser(s) Affected

_No response_

### OS(s) Affected

_No response_

### Device(s) Affected

_No response_

### AMP Version Affected

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.