Typically when creating custom elements you may want to do a few of things on the client side:
- Define a custom view for the element.
- Handle changes to global settings.
Defining custom views
If your element simply renders content then it’s probably not necessary to create a custom view.
Defining custom behaviour
You can also register a callback function to be run when a given element is destroyed in a similar way using the
Handling setting changes
Tailor manages a number of global settings (e.g., section width) which may affect your element. You can listen for changes to any of the defined Tailor settings as follows:
from are the new and old setting values, respectively.