Jelajahi Sumber

Merge pull request #638 from Calinou/doc-svg-polyfill

Document how to use `template` in `svg` elements using a polyfill
Caleb Porzio 5 tahun lalu
induk
melakukan
d0b49a346c
1 mengubah file dengan 4 tambahan dan 0 penghapusan
  1. 4 0
      README.md

+ 4 - 0
README.md

@@ -457,6 +457,8 @@ It's important that `x-if` is used on a `<template></template>` tag because Alpi
 
 > Note: `x-if` must have a single element root inside the `<template></template>` tag.
 
+> Note: When using `template` in a `svg` tag, you need to add a [polyfill](https://github.com/alpinejs/alpine/issues/637#issuecomment-654856538) that should be run before Alpine.js is initialized.
+
 ---
 
 ### `x-for`
@@ -482,6 +484,8 @@ If you want to access the current index of the iteration, use the following synt
 
 > Note: `x-for` must have a single element root inside of the `<template></template>` tag.
 
+> Note: When using `template` in a `svg` tag, you need to add a [polyfill](https://github.com/alpinejs/alpine/issues/637#issuecomment-654856538) that should be run before Alpine.js is initialized.
+
 #### Nesting `x-for`s
 You can nest `x-for` loops, but you MUST wrap each loop in an element. For example: