justinribeiro / lite-youtube

The fastest little YouTube web component on this side of the internet. The shadow dom web component version of Paul's lite-youtube-embed.
https://www.npmjs.com/package/@justinribeiro/lite-youtube
MIT License
836 stars 63 forks source link

Probable bug wrt capitalization #91

Closed elibarzilay closed 1 year ago

elibarzilay commented 1 year ago

I'm guessing that there's some bug here:

case 'videoid':
case 'playlistid':
case 'videoTitle':
case 'videoPlay': {

Maybe the last two should be lowercased? And if so, then probably also the attribute name in the getter/setter should be lowercased as well?

Related, and I'm not sure about it since I don't have experience with it, but maybe they should both be included in observedAttributes?

elibarzilay commented 1 year ago

It does look like this didn't work before I changed the code...

justinribeiro commented 1 year ago

but maybe they should both be included in observedAttributes

I'd have to dig back, but I think at one point they were and during the major jump they got sliced out (because folks weren't using it).

From is-it-a-bug standpoint, I suppose if you're doing reused context and flipping the title or switching a locale.

I split this patch out and added you as co-author.

elibarzilay commented 1 year ago

Thanks! I'll open a separate pr for the other thing...