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
Razor: Link and Script tags, enableoptimizations strips out defer #2454
Comments
As of now data-enableoptimizations picks up the tag and tries to merge it with DNNs Client-Dependency Framework. If you use "defer" I think there is no reason to use data-enableoptimization, since that is kind of better than the older Client-Dependency approach. What do you think? |
Yeah, also, I realize now the problem is not really yours since you are just calling Dnn's RegisterScript() and that function is actually stripping it out. I do agree with what you said, but the optimizations also eliminate dupes which are likely with multiple 2sxc Views on the same page. |
@jeremy-farrance Gotcha. I'll need some time thinking about this. We're currently implementing something related to this called turnOn - http://r.2sxc.org/turnon. I would be curious to hear your thoughts on that. Maybe post thoughts related to turnOn on #2458 |
So is this solved recently? |
should be fixed in 13.03 |
Was fixed in 13.03 |
I'm submitting a [x] bug report about [x] Razor templating
Current behavior
Trying to get a <script> on the page using Razor in a View...
But the result unexpectedly strips out
defer
...Expected behavior
Seems like it should leave attributes in place that it doesn't deal with, so I would expect to see this in the resulting HTML:
Instructions to Reproduce the Problem
Add the first code example above to a View/Razor file. It will work, but View Source and the "defer" is gone.
Why change the behavior?
It seems like the behavior of
data-enableoptimizations
should be to only deal with things it knows about and pass through anything unknown.Your environment
2sxc version(s): 12.2.1
Browser: all/any
Language: any/all
The text was updated successfully, but these errors were encountered: