-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Script type="module" issue #15375
Comments
Issue is that it will copy all attributes set on the script tag to the child elements. But that is "by design" which I'm not sure it should. |
For sure, I just wanted to point out that it shouldn't block what you are working on. I agree, inheriting attributes doesn't seem like a great design choice when expanding dependencies. The offending bit of code is here. Looking over what As far as I can see, the only thing that's desirable to be merged (and won't be overwritten be the required resource anyway) is |
If something is broken we should get reports quite quickly. Would have been nice to add a few tests as to show what are the expectation (I know the original dev didn't add any, bad person). |
Does the Style tag helper have the same issue? |
The new dev didn't either 😢 |
@Piedone Also see this one who needs Unit tests. |
What do you mean should I see here? |
I mean, someone needs to work on adding a unit test for these script and style tag helpers. |
I'm not sure I understand. Why did you approve #15438 without them, then? Otherwise, please create an issue for unit tests. |
Should we block PR's because of missing unit tests? We never did before. I will add the task. Added here: #15504 I meant that there is work to do for this too and I need to take a look into this before moving to reviewing other PR's. |
Yes, absolutely. If tests are needed, then a PR is not done until the tests are done. Thanks! Just to be clear, while Sára is my colleague and works on a lot of OC-related tasks as a Lombiq developer, this was done in her own time without my involvement. |
I'm not 100% committed that unit test enforcement as you just said. People are doing this on their own free time and sometimes creating unit tests is not their bag of tea either. So, we either need to write them and merge on top of their PR's or merge them and do the unit tests later. I think, for this one it needs to be tested by people using the dev branch. We don't even know what the initial specs we're and why it copied these attributes to the dependency tree (script at least). All we can do is define the specs now and try to support others if we ever encounter them later on. |
Yeah but then somebody else needs to write the tests in their free time :). I can't comment on the details of this specific PR. |
Describe the bug
When using
<script asp-name="something" type="module">
the dependent scripts also gets a type="module" parameter added to its script tag if it is defined in a ResourceManagementOptionsConfiguration as a dependency.To Reproduce
<script type="module" asp-name="media" version="2" at="Foot"></script>
Look at the script added and all of the dependent scripts will have a type="module" added to them.
Expected behavior
Only the main script should have type="module" added.
The text was updated successfully, but these errors were encountered: