You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
asp-fallback-test
The script method defined in the primary script to use for the fallback test. For more information, see FallbackTestExpression.
I am trying to use asp-fallback-test attribute to check if the script from cdn is loaded with integrity check.
Currently we use window.jQuery for jQuery and use window.axios for https://cdn.bootcdn.net/ajax/libs/axios/0.19.2/axios.min.js as the asp-fallback-test.
Currently we are using _.assign as ap-fallback-test value, I am not sure if it's the best practice.
And why you did not export this js library to window as the other libraries did? Maybe something like window.lodash
_.assign did not work for me (it causes Uncaught ReferenceError: _ is not defined if the lodash js file is not found) however simply window._ seems to work well for me.
asp-fallback-test
The script method defined in the primary script to use for the fallback test. For more information, see FallbackTestExpression.
I am trying to use asp-fallback-test attribute to check if the script from cdn is loaded with integrity check.
Currently we use
window.jQuery
for jQuery and usewindow.axios
for https://cdn.bootcdn.net/ajax/libs/axios/0.19.2/axios.min.js as the asp-fallback-test.Related references
https://stackoverflow.com/questions/40626754/how-to-use-fallback-source-on-scripttaghelper-and-linktaghelper-correctly
aspnet/Mvc#1576
aspnet/Mvc#1580
The text was updated successfully, but these errors were encountered: