You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first advantage here is that it'll work without javascript. The idea is to enhance the <img> element instead of trying to replace it. The unpic-img element would take care of any non-standard attributes and modify the child image accordingly.
This would break->change the current API. Could consider making another web component instead of breaking the current one made with LitElement.
Thanks. I saw both of those posts and think this would be a good idea. We already have both webc and Lit, so I'm not sure what the best approach would be. I think a "plain" HTML web component might be the way
Yes, a plain one makes sense to me, too. Don't believe Lit is needed, since it's really about rendering a single element and it looks like you have all the prop logic extracted already.
The web component version of unpic currently requires markup like this
I'd like to discuss an alternative markup:
The first advantage here is that it'll work without javascript. The idea is to enhance the
<img>
element instead of trying to replace it. The unpic-img element would take care of any non-standard attributes and modify the child image accordingly.This would break->change the current API. Could consider making another web component instead of breaking the current one made with LitElement.
See https://www.zachleat.com/web/a-taxonomy-of-web-component-types/#html-web-components and https://adactio.com/journal/20618 for more thoughts on this.
What do you think?
The text was updated successfully, but these errors were encountered: