Browse Source

Document how to use `template` in `svg` elements using a polyfill

This closes #637.

Co-authored-by: Simone Todaro <simone.todaro@gear4music.com>
Hugo Locurcio 5 years ago
parent
commit
6586fcb145
1 changed files with 4 additions and 0 deletions
  1. 4 0
      README.md

+ 4 - 0
README.md

@@ -447,6 +447,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`
@@ -472,6 +474,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: