question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove type="text/javascript" attribute from script element created in blazor.webassembly.js

See original GitHub issue

Is your feature request related to a problem? Please describe.

A script element added from blazor.webassembly.js has a type=“text/javascript” attribute which makes HTML validation fail after JS/Blazor has loaded. I’m publishing from microsoft.netcore.app.runtime.browser-wasm\5.0.1.

Describe the solution you’d like

There is no reason for using type attributes on script elements in HTML5 documents so just remove that attribute… The failing excerpt: <script type="text/javascript">var Module; windo"...

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
krompacocommented, Jan 15, 2021

Hi! Search for type/javascript in *.js files. It’s added dynamically by the script I refer to.

Thanks. I will do this in AspNetCore.sln level?

Looked around and seems like this is the place (so TypeScript not .js)…

https://github.com/dotnet/aspnetcore/blob/6b95e58bb4d113d210e519b99f79365b8a5dbb19/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts#L208

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue with RenderFragment in Blazor after leaving page ...
Blazor needs the generated html to remain unaltered or it can't find elements reliably to remove from the DOM.
Read more >
Adding script references in Blazor
Learn here about that how to add the script references manually in the Syncfusion Blazor Components.
Read more >
ASP.NET Core Blazor JavaScript interoperability (JS interop)
Learn how to interact with JavaScript in Blazor apps. ... The <div> element is removed from the DOM along with the rest of...
Read more >
Two Methods For Using DataTables.net JavaScript Library
The purpose of this document is to demonstrate two different ways to use the DataTables.net JavaScript library in Blazor Web Assembly.
Read more >
Lift & Shift Existing Chrome Extension to Blazor ...
Throughout this post, I'm going to walk through how to migrate the existing Chrome extension with minimal code changes.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found