-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
How to add a new property to a img? #99
Comments
Hi, if you just want to add it to your laminar project, you can just say:
( If you want to add it to SDT, you need to create a record for it in MDN link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin |
Hi @raquo like this? #100 If appropriate, could you help approve this pr? Or what else do I need to add.... Actually, I hope to use the newly added attr in Calico's DSL Perhaps I should submit a PR to update Calico's dependencies scala-dom-types after making changes in this repository |
Sure, please see my comments on that PR, it needs some small changes. I am not sure what the Calico alternative to: val crossOrigin: HtmlProp[String] = htmlProp("crossOrigin", StringAsIsCodec) syntax is, it probably looks very similar, but it depends on their classes and method names. |
updated pr and need approve again |
Ok, merged, thanks. I can make a release later this week, I think. If you need this sooner, you really should figure out how to add custom attributes in your Calico project, it should be a simple one-liner. Just so that you're not blocked by the SDT release process. |
This is a good suggestion. Thank you for your help! |
Hey @raquo i want to add crossOrigin(https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/crossOrigin) to img tag.
Do I just need to add this code in https://github.com/raquo/scala-dom-types/blob/04e66590f96216fe1e20036c4d9a32d59205526b/js/src/test/scala/com/thirdparty/defs/props/Props.scala#L713C2-L713C2 add code like
lazy val crossOrigin: Prop[String, String] = stringProp("crossOrigin")
?The text was updated successfully, but these errors were encountered: