// This does mostly the same as that example from the official docs
let simple = () => {
let template = Handlebars.compile("Handlebars {{doesWhat}}")
let out = template({ doesWhat: "rocks!" })
console.log(out)
return out
}
let nested = () => {
}
let eval = () => {
}
// Simple helper
Handlebars.registerHelper('', (str) => {
return ''
})
// Block helper
Handlebars.registerHelper('', (items, options) => {
})
// Handlebars registered partial
Handlebars.registerPartial('', '')
inlinePartial = `
{{#*inline "inlinePartial"}}
{{/inline}}`
let advanced = () => {
}
// Run "main" after all is loaded
document.addEventListener("DOMContentLoaded", function() {
let output = document.createElement('div')
output.id = 'output'
document.getElementById('meta').append(output)
// Here we use those "triple mustaches"!
let template = Handlebars.compile(`
Simple: {{{simple}}}
Nested: {{{nested}}}
Eval: {{{eval}}}