Hellama - Autoremoving attributes

Back to Hellama

After the processing, if the HTML contains opening hellama sequence, it will be removed. Therefore, if the hellama tag definition doesn't contain replacement (or contains null), it removes the attribute.

In the example below, the disabled contains empty string, it is replaced and the attribute kept. The className contains null, it is not replaced and the attribute removed. The style is missing, so it is removed, too. The hello is also missing, but HTML contents is never removed, only replaced.

<button id="test" disabled="{disabled}" class="{className}" style="{style}"> {hello} </button> const cfg = { open: "{", close: "}" }; const tags = { disabled: "", className: null }; hellama([test], tags, cfg);