-
Notifications
You must be signed in to change notification settings - Fork 0
API
Luiz Henrique Canet Filho edited this page Mar 24, 2020
·
1 revision
modnes Data Controller
Meta
- author: Luiz Henrique Canet Filho <me@luizca.net>
- See: CustomEvent
The built in custom event object.
- See: Proxy
The built in proxy object.
Data Handler
Create a data handler
Parameters
-
eventTarget
EventTarget Object that will trigger dataUpdated event -
prefix
string Prefix of the property beeing updated
Set a property
Parameters
-
target
object An object beeng updated -
property
string The property name beeing updated -
value
any The new value of the property
Get a property
Parameters
-
target
object The target object -
property
strng The property name
Returns (any | Proxy) The property value or a new proxy
- See: EventTarget
The built in event target interface.
Data Controller
Create a data controller
Parameters
host
-
eventTarget
EventTarget Object that will host the data
Set the data
Parameters
-
data
obect Data object
Bind updated data to DOM using a mapping set
Parameters
Update the DOM using a mapping set and data
Parameters
Update an DOM element using a map configuration and a value
Parameters
-
element
HTMLElement A DOM HTML element -
map
object Map configuration object -
value
(string | number) A string or number value
Bind a form to data
Parameters
-
form
HTMLFormElement A form element
Update a data property using field value from form
Parameters
-
field
(Element | RadioNodeList) A form element -
form
HTMLFormElement A form element