Currently we have three components employed in our project.
ToggleSwitch
StreamItem
ListItem
All of them are direct instances of <HTMLElement> , this makes them less interactive than existing html elements.
For instance, We can instead extend toggleSwitch from existing <HTMLInputElement>
and streamItem/listItem from <HTMLAnchorElement> element.
This will allow knowing the state of toggleSwitch from outside without the help of internal code and make streamItem/listItem clickable as a link for browser actions.
We can call our components from the exisiting elements using the is attribute. However the is attribute is not supported by Safari, for which the support would be aided by a polyfill.
Now that this project will use Lit Components which does not support Custom Built-In Components due to Webkit incompatibilty, this is being closed. It will be reopened once webkit =/> lit adds support for it.
Currently we have three components employed in our project.
All of them are direct instances of
<HTMLElement>
, this makes them less interactive than existing html elements. For instance, We can instead extend toggleSwitch from existing<HTMLInputElement>
and streamItem/listItem from<HTMLAnchorElement>
element. This will allow knowing the state of toggleSwitch from outside without the help of internal code and make streamItem/listItem clickable as a link for browser actions. We can call our components from the exisiting elements using theis
attribute. However the is attribute is not supported by Safari, for which the support would be aided by a polyfill.