HTML parser in Sciter v.3 supports attribute shortcuts allowing to write HTML in more compact form. Compare these two declarations that are identical (to the Sciter):
Compact:
<input|currency(itemPrice) value=1000>
and standard:
<input type="currency" name="itemPrice" value=1000>
As you see the first one is slightly shorter and better readable (subjective of course).
Here is full list of supported attribute shortcuts:
#name
– id, attribute name that starts from ‘#’ is parsed as id=”name”.name
– class, this is an equivalent ofclass="name"
. Element may have multiple “dot attributes”. All of them are combined into single class attribute. So this <div.container.collapsed> is treated as this: <div class=”container collapsed”>|name
– type, attribute name that starts from ‘|’ is parsed astype="name"
(someName)
– name, attribute name enclosed into ‘(‘ and ‘)’ is parsed asname="someName"
Just in case 🙂