n-ce / ytify

Opus Audio Streaming Web App for YouTube. Stop watching, Listen & Save Data.
https://ytify.netlify.app
GNU General Public License v3.0
145 stars 48 forks source link

extend existing html elements instead of creating new #138

Closed n-ce closed 6 months ago

n-ce commented 10 months ago

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 the is attribute. However the is attribute is not supported by Safari, for which the support would be aided by a polyfill.

n-ce commented 6 months ago

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.