Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Some helpful macros for aria templates.
// Log any object in the console
{macro _log(obj)}
// create a section with a one-liner : {call _section("mysection", "boundvalue", "div")/}
{macro _section(id, bindings, type, css)}
{var _gb = null /}
${(function(){_gb=function(b){return {inside:data,to:b}}})()}
${(function(){bindings=Array.isArray(bindings)?{return _gb(b)}):[_gb(bindings)]})()}
${(function () {type = type ? type : "div"; return ""})()}
{section {
id : id,
type : type,
macro : id,
bindRefreshTo : bindings,
cssClass : css || undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment