Git Product home page Git Product logo

Comments (6)

raquo avatar raquo commented on May 20, 2024 1

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.

from scala-dom-types.

raquo avatar raquo commented on May 20, 2024

Hi, if you just want to add it to your laminar project, you can just say:

val crossOrigin: HtmlProp[String] = htmlProp("crossOrigin", StringAsIsCodec)

(stringProp is not accessible to users, IIRC)

If you want to add it to SDT, you need to create a record for it in ReflectedHtmlAttrDefs.scala, with property name "crossOrigin" and attr name "crossorigin". If you're not up for that, I'll do it eventually.

MDN link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin

from scala-dom-types.

cyz1901 avatar cyz1901 commented on May 20, 2024

Hi, if you just want to add it to your laminar project, you can just say:

val crossOrigin: HtmlProp[String] = htmlProp("crossOrigin", StringAsIsCodec)

(stringProp is not accessible to users, IIRC)

If you want to add it to SDT, you need to create a record for it in ReflectedHtmlAttrDefs.scala, with property name "crossOrigin" and attr name "crossorigin". If you're not up for that, I'll do it eventually.

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
Finally, use the latest Calico version in my project?

from scala-dom-types.

cyz1901 avatar cyz1901 commented on May 20, 2024

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

from scala-dom-types.

raquo avatar raquo commented on May 20, 2024

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.

from scala-dom-types.

cyz1901 avatar cyz1901 commented on May 20, 2024

This is a good suggestion. Thank you for your help!

from scala-dom-types.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.