DOCUMENTATION

How does it work?

Add some attributes in the DOM, mixhtml will interpret them. The user will interact with the website and mixhtml will trigger a fetch request to the server.

The server will interpret the request and will reply with special attributes that mixhtml will understand in the response.

Simply said, mixhtml makes fetch request and responses easy to manage.

Request

This is a list of all the attributes that can be set in any DOM element. These attributes will enable the use of mixhtml and therefore, the creation of fetch requests and making the website a single page app SPA.

  • mix-get
  • mix-post
  • mix-put
  • mix-patch
  • mix-delete
  • mix-input
  • mix-delay
  • mix-focus
  • mix-blur
  • mix-cover
  • mix-await
  • mix-done
  • mix-validate

Response

This is a list of all the attributes that can used in the response. These attributes will be used together with DOM elements that will be interpret by the browser when the response arrives.

  • mix-before-begin
  • mix-after-begin
  • mix-before-end
  • mix-after-end
  • mix-show
  • mix-hide
  • mix-remove
  • mix-replace
  • mix-update
  • mix-function
  • mix-script
  • mix-redirect

Inner Attributes

In the response, some DOM elements may contain special attributes. Here is the list of those attributes.

  • mix-hide
  • mix-remove
  • mix-fade-1000
  • mix-fade-2000
  • mix-fade-3000
  • mix-fade-4000
  • mix-fade-5000
  • mix-ttl