Slots
- addSource
-
Add a new element as a child to this element. Return this.
- addClassNameSource
-
native This addClassName(Str className)Add the given CSS class name to this element. If this element already contains the given class name, then this method does nothing. Returns this.
- boundsSource
-
Rect boundsPosition and size of this widget relative to its parent, both measured in pixels.
- checkedSource
-
native Bool? checkedThe checked attribute for this element, or null if one does not exist. This is typically only valid for some form elements.
- childrenSource
-
native Elem[] children()Get the child nodes of this element.
- classNameSource
-
native Str classNameThe CSS class name(s) for this element.
- enabledSource
-
native Bool? enabledThe enabled attribute for this element, or null if one not applicable. This is typically only valid for form elements.
- findSource
-
native Elem? find(|Elem -> Bool| c)Return the first descendant for which c returns true. Return null if no element returns true.
- findAllSource
-
native Elem[] findAll(|Elem -> Bool| c)Return a list of all descendants for which c returns true. Return an empty list if no element returns true.
- firstSource
-
native Elem? first()Get the first child node of this element, or null if this element has no children.
- focusSource
-
native Void focus()Request keyboard focus on this elem.
- getSource
-
native Obj? get(Str name, Obj? def := null)Get an attribute by name. If not found return the specificed default value.
- hasClassNameSource
-
native Bool hasClassName(Str className)Return true if this element has the given CSS class name, or false if it does not.
- htmlSource
-
native Str htmlThe HTML markup contained in this element.
- idSource
-
native Str idThe id for this element.
-
new make() - nameSource
-
native Str nameThe name attribute for this element.
- nextSource
-
native Elem? next()Get the next sibling to this element, or null if this is the last element under its parent.
- onEventSource
-
native Void onEvent(Str type, Bool useCapture, |Event| handler)Attach an event handler to the given event on this element.
- parentSource
-
native Elem? parent()Get the parent Elem of this element, or null if this element has no parent.
- posSource
-
native Point posPosition of element relative to its parent in pixels.
- prevSource
-
native Elem? prev()Get the previous sibling to this element, or null if this is the first element under its parent.
- removeSource
-
native This remove(Elem child)Remove a child element from this element. Return this.
- removeClassNameSource
-
native This removeClassName(Str className)Remove the given CSS class name to this element. If this element does not have the given class name, this method does nothing. Returns this.
- setSource
-
native Void set(Str name, Obj? val)Set an attribute to the given value.
- sizeSource
-
native Size sizeSize of element in pixels.
- tagNameSource
-
native Str tagName()Get the tag name for this element.
- valSource
-
native Obj? valThe value attribute for this element, or null if one does not exist. This is typically only valid for form elements.