-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: fetchpriority #42
Comments
Right now unknown component props are forwarded to the internal <Img {src} fetchpriority="high" /> will be rendered similar to your attached code - but not for |
@zerodevx I thought you might reply along these lines. I would point out that other props you have implemented fall under the same caveat. Not sure what is the best way forward, but as long as you have implemented Edit: The |
The reason why |
Can you give an example of code output? Not understanding what you mean by changing img tag defaults. |
I meant the HTMLElement svelte-img/src/lib/SvelteImg.svelte Lines 5 to 18 in 8254cd1
These explicitly declared props are not arbitrary - each of them has a reason behind why it's declared. I'm not understanding the reason for explicitly declaring |
@zerodevx I see what you are saying. My original thought was to include it for educational purposes for the users of Off-topic: I guess it's an OK idea to always default to Anyways I think it is nice to be explicit and mention all the different toggles that are available that one will probably want to use with this component, at the very least in the docs. Me from a couple weeks ago might have just picked up this library and ran with it without coming across If you were to make a Feel free to close; just am curious to hear how you think about this. |
That could be a lot of props. 😅 But I think we could mention the salient ones in the docs. Will be delighted to take a PR for it.
That's a good alternative too - don't have to hint every prop, but salient ones like what you mentioned might be helpful.
Generally yes - I'd normally lean towards providing just a base set of opinions, but allowing effects to be overridden if the consumer is more informed or inclined to do so. |
I'm pretty sure I was thinking I will submit a PR later with some types with comment that would show up in IDE when using the component. |
I don't see any support for
fetchpriority="high"
here. I'm thinking this is something you may want to add.The text was updated successfully, but these errors were encountered: