H-SMILE core. CSSS! (css-script) language.

DOM element object

$1() function returns object that represents DOM element.  DOM element as an object supports three types of accessors:

DOM element has also various methods that are accessible through the dot notation: domobj.function-name().

DOM element attributes

Any attribute of DOM element can be set or removed from the element.

To remove attribute from element's attribute collection assign null to it:

self.show = true; // will assign value "true" to the show attribute;
self.show = null; // will remove show attribute from
                  // the collection of DOM element attributes.

DOM element state values

Element has synthetic and plain state fields. Following code will set :visited state field for the link element when that link will be clicked.

a:link
{
  click!: self:visited = true;
}

Synthetic state fields:

Plain state fields are all of type boolean. Names of these state flags are exactly the same as correspondent CSS pseudo-classes:

Style attributes of the DOM element

CSSS! allows to set value of all supported CSS attributes. Full list of supported attributes can be found at: sciter.com/docs/content/css/cssmap.html

Following style rule will show fade-out effect when some div will get fade-out DOM attribute:

div[fade-out]
{
  assigned!: self::opacity = 1.0, self.start-timer(50);
  timer!: self::opacity < 1.0?
          self::opacity = self::opacity + 0.1 # return cancel /* to stop the timer */;
}

Functions (methods) supported by the DOM element

There is a set of methods that are defined for the DOM element in CSSS! :