We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For example, it can be useful to add defer/async attribute to optimize page load time.
defer/async
The text was updated successfully, but these errors were encountered:
Hi,
We could add an additional htmlAttributes: Html parameter with a default value, so that the new library version remains compatible with existing code.
htmlAttributes: Html
Parameters of src/main/twirl/scalajs/scripts.scala.html would look like:
src/main/twirl/scalajs/scripts.scala.html
@(projectName: String, assets: String => String, resourceExists: String => Boolean resourceExists: String => Boolean, htmlAttributes: Html = Html("") )
Usage would be:
@scalajs.html.scripts( projectName = "client", name => s"/assets/$name", name => getClass.getResource(s"/public/$name") != null, Html("defer async newAttr=newValue") )
What do you think?
Sorry, something went wrong.
looks perfectly fine to me :) Sorry, haven't had time to make a pr yet :(
No worries, I'll include the changes.
56eebd6
No branches or pull requests
For example, it can be useful to add
defer/async
attribute to optimize page load time.The text was updated successfully, but these errors were encountered: