diff --git a/www/attributes.md b/www/attributes.md index 415cf6cc..f86d137b 100644 --- a/www/attributes.md +++ b/www/attributes.md @@ -11,9 +11,9 @@ title: > kutty - Attributes | [kt-classes](/attributes/kt-classes) | timed modification of classes on an element | [kt-confirm](/attributes/kt-confirm) | shows a confim() dialog before issuing a request | [kt-delete](/attributes/kt-delete) | issue a `DELETE` to the specified URL -| kt-error-url | TODO - Description +| [kt-error-url](/attributes/kt-error-url) | a URL to send client-side errors to | [kt-get](/attributes/kt-get) | issue a `GET` to the specified URL -| kt-history-elt | TODO - Description +| [kt-history-elt](/attributes/kt-history-elt) | the element to use for history snap-shotting & restoration | kt-include | TODO - Description | kt-indicator | TODO - Description | [kt-patch](/attributes/kt-patch) | TODO - Description diff --git a/www/attributes/kt-error-url.md b/www/attributes/kt-error-url.md new file mode 100644 index 00000000..cd8d7655 --- /dev/null +++ b/www/attributes/kt-error-url.md @@ -0,0 +1,23 @@ +--- +layout: layout.njk +title: > kutty - kt-error-url +--- + +## `kt-error-url` + +The `kt-error-url` attribute allows you to send client-side errors to a specified URL. It is typically put on the +body tag, so all errors are caught and send to the server. + +```html +
\ + + +``` +When a client side error is caught by kutty it will be `POST`-ed to the given URL, with the following JSON format: + +```json + { "elt": elt.id, "event": eventName, "detail" : detail } +``` + +### Notes + diff --git a/www/attributes/kt-history-elt.md b/www/attributes/kt-history-elt.md new file mode 100644 index 00000000..e68bd7e5 --- /dev/null +++ b/www/attributes/kt-history-elt.md @@ -0,0 +1,31 @@ +--- +layout: layout.njk +title: > kutty - kt-history-elt +--- + +## `kt-history-elt` + +The `kt-history-elt` attribute allows you to specify an element as the place +where [history support](/docs#history) will capture HTML from and restore it to +during history navigation. + +By default the `body` tag is used but you may want to narrow this to a child +element. Be careful if you do, however: the element must be present on all pages +in your application or a history navigation may fail. + +Here is an example: + +```html + + +