Skip to content

Blazor JavaScript tag #24231

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

Closed
vd3d opened this issue Jul 23, 2020 · 1 comment
Closed

Blazor JavaScript tag #24231

vd3d opened this issue Jul 23, 2020 · 1 comment
Labels
area-blazor Includes: Blazor, Razor Components ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved

Comments

@vd3d
Copy link

vd3d commented Jul 23, 2020

Currently, blazor support the <style> tag, it is really helpful, this way we can add CSS style only in their respective components.
Otherwise, it is a pain to manage and clean very large CSS files.

So, I think we also need a tag that we can use into each component, with specific component JavaScript.
Currently, I have my own library loading some JavaScript on the fly, but it is done from the code.
My library do the following:

  • Evaluate("....")
  • LoadFromURL("HTTP://....")
  • LoadFromScript("var t = ....")

Why JavaScript, because today, there exist so much JS libraries ... they are useful too, having a 100% C# platform is not realist today.

And it works perfectly since months (I can share my code) :-)

Describe the solution you'd like

So, my proposition is

  1. to have a <Script> tag with theses features, but also:
  • is able to optimize and minify this JavaScript code
  • Version 2, can even support TypeScript etc...

(I have try to create it myself, but the Fragments seems to only support HTML like for now)

  1. improve the <style> tag to minify the css (and version 2) can even support SCSS etc...
    (I know that it is an existing feature request already)
@javiercn javiercn added the area-blazor Includes: Blazor, Razor Components label Jul 23, 2020
@mkArtakMSFT
Copy link
Contributor

Thanks for contacting us.
This is a dupe of #23560

@mkArtakMSFT mkArtakMSFT added the ✔️ Resolution: Duplicate Resolved as a duplicate of another issue label Jul 23, 2020
@ghost ghost added the Status: Resolved label Jul 23, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Aug 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved
Projects
None yet
Development

No branches or pull requests

3 participants