Skip to content
Snippets Groups Projects
Commit 591d2e7c authored by Rafael Ostertag's avatar Rafael Ostertag
Browse files

Updated PROTOCOL.md

parent bddd34ce
No related branches found
No related tags found
No related merge requests found
......@@ -133,6 +133,51 @@ having the following structure
radio button `value`-attribute to be activated in `"value"`.
### Form Group Configuration Response
As part of the server response, the JSON stream may contain a key
`element-update`. This key stores information on how to modify HTML elements identified by `id`. Modifying in this
context refers to:
* Setting attribute values
* Deleting attributes
* Setting content of a HTML element.
The content of `element-update` is outlined below
{
...
"element-update" : {
"<element_id1>": {
"attr": {
"<attr_name1>": "<value1>" | null,
...
"<attr_nameN>": "<valueN>" | null
},
"content": "<element_content>"
},
...
"<element_idN>": {
"attr": {
"<attr_name1>": "<value1>" | null,
...
"<attr_nameN>": "<valueN>" | null
},
"content": "<element_content>"
}
},
...
}
The presence of `element-update` is optional. `<element_idN>` refers to the element's `id`-attribute value. It used
to uniquely identify the HTML element in the DOM. The properties `"attr"` and `"content"` are both optional.
Supplying `null` as value for `"<attr_nameN>"` will remove the attribute from the HTLM element identified by
`"<element_idN>"`.
If the element has no `"<attr_nameN>"` attribute, it will be created. In any case, the attribute's value will be set
to the value specified by `"<valueN>"`. See above for handling of `null` value.
### Redirection Response
Depending on the request, the server may return redirection
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment