HTML<script type=template>官方?

HTML <script type=template> official?

除了有一个 template tag in HTML5 之外,我想知道这种类型的脚本标签 <script type="text/template"> 是否符合 HTML 标准?

根据the spec

The script element allows authors to include dynamic script and data blocks in their documents.

所以包括一个模板就可以了。

然而,

text/template 不是 a registered MIME type,因此 text/x-template 更合适(x- 是实验性 MIME 类型的传统前缀)。

这是一个老问题,但几年前有人问过:Explanation of <script type = "text/template"> ... </script>

从表面上看,这不是官方的。只是您合并其他代码的一种方式