Section Element
Properties
See here.
See here.
Some convenience functions for modifying an element's style attribute.
Functions
A convenience function to append a class to an existing class attribute.
Requires that a specific plugin or plugins be loaded by listing them in the plugins
parameter of the Kweb constructor.
Return a KVar that is tied to a property related to an element, which will update when an specified event fires on this element. This is a convenience wrapper around bind.
Return a KVar that is tied to a property related to an element, which will update when an specified event fires on this element.
A convenience function to set the class attribute, this is a wrapper around set.
A convenience function to set the class attribute, this is a wrapper around setAttribute.
Remove this element by calling removeChild on its parent element. An error will occur in the browser if the element doesn't exist.
Remove this element by calling removeChild on its parent element if it exists.
Selects the element based on id, then executes the provided js
Created by ian on 2/22/17.
A convenience function to remove one or more classes from an existing class attribute. This will be ignored if onlyIf is false.
Set an attribute of this element. For example a().setAttribute("href", "http://kweb.io")
will create an <a>
element and set it to <a href="http://kweb.io/">
.
Set an attribute to the value in a KVal, if the value changes the attribute value will be updated automatically.
Set an attribute of this element. For example element["href"] = "http://kweb.io"
will create an <a>
element and set it to <a href="http://kweb.io/">
.
Set an attribute to the value in a KVal, if the value changes the attribute value will be updated automatically.
Set an attribute of this element. For example a().setAttribute("href", "http://kweb.io")
will create an <a>
element and set it to <a href="http://kweb.io/">
.
A convenience function to set the class attribute, this is a wrapper around setAttribute.
Determines whether this element will be spellchecked.
Set the text of this element to value
. Eg. h1().text("Hello World")
will create a h1
element and set its text as follows: <h1>Hello World</h1>
.
Set the text of this element to an KVal value. If the text in the KVal changes the text of this element will update automatically.