summaryrefslogtreecommitdiffstats
path: root/FAQ.md
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2014-07-05 12:21:39 -0500
committerkpdecker <kpdecker@gmail.com>2014-07-05 12:21:39 -0500
commit7890c7dc891b264bb28b477ffd3b2e6053f4b1d4 (patch)
tree215f816dd7a4193b3372b70de92edcab5449418a /FAQ.md
parentb79e31e5a52b73b445ee27c5272a0ad213f26ae8 (diff)
downloadhandlebars.js-7890c7dc891b264bb28b477ffd3b2e6053f4b1d4.zip
handlebars.js-7890c7dc891b264bb28b477ffd3b2e6053f4b1d4.tar.gz
handlebars.js-7890c7dc891b264bb28b477ffd3b2e6053f4b1d4.tar.bz2
Add basic FAQ
Diffstat (limited to 'FAQ.md')
-rw-r--r--FAQ.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/FAQ.md b/FAQ.md
new file mode 100644
index 0000000..35cbee9
--- /dev/null
+++ b/FAQ.md
@@ -0,0 +1,22 @@
+# Frequently Asked Questions
+
+1. How can I file a bug report:
+ Please don't hesitate to let us know if you find something wrong! In general we are going to ask for an example of the problem failing, which can be as simple as a jsfiddle/jsbin/etc. We've put together a jsfiddle [template](http://jsfiddle.net/9D88g/11/) to ease this. (We will keep this link up to date as new releases occur, so feel free to check back here)
+
+1. Why is it slower when compiling?
+ The Handlebars compiler must parse the template and construct a JavaScript program which can then be run. Under some environments such as older mobile devices this can have a performance impact which can be avoided by precompiling. Generally it's recommended that precompilation and the runtime library be used on all clients.
+
+1. Why doesn't this work with Content Security Policy restrictions?
+ Handlebars generates a dynamic function for each template which can cause issues with pages that have enabled Content Policy. It's recommended that templates are precompiled or the `unsafe-eval` policy is enabled for sites that must generate dynamic templates at runtime.
+
+1. How can I include script tags in my template?
+ If loading the template via an inlined `<script type="text/x-handlebars">` tag then you may need to break up the script tag with an empty comment to avoid browser parser errors:
+
+```
+ <script type="text/x-handlebars">
+ foo
+ <scr{{!}}ipt src="bar"></scr{{!}}ipt>
+ </script>
+```
+
+ It's generally recommended that templates are served through external, precompiled, files, which do not suffer from this issue.