Open davutkara opened 6 years ago
Total sidebar: Does your app really need support IE10? These tags are not supported in IE11/Edge.
@hecktarzuli This feature can be needed for other purpose. I think if the item of meta array is string, add string directly. Also there are a few people who uses old IE browsers.
This might cause a problem when using multiple child components which set the same vmid and only one has the comments defined. Not sure if we can guarantee the correct order in that case when everything is merged
@manniL Wdyt? We could also add prefix
/ suffix
attributes (which maybe only work on ssr?)
I'm not sure if it's worth the hassle implementing it as it only helps With IE < 11. People using Nuxt can always use a custom AppView (HTML file) anyway.
I have added the target: v3
label because if we are going to refactor vue-meta as proposed then it should probably be supported by default already (using vue 3.0 fragments)
I'm trying to include a fragment such as below (from stackoverflow). Is there another way to do this with vue-meta, or should I look for another solution, while waiting on this branch? (My intention is to not support IE -- and explicitly navigate users somewhere else to tell them it isn't supported.)
<!-- For IE <= 9 -->
<!--[if IE]>
<script type="text/javascript">
window.location = "https://google.com";
</script>
<![endif]-->
<!-- For IE > 9 -->
<script type="text/javascript">
if (window.navigator.msPointerEnabled) {
window.location = "https://google.com";
}
</script>
I'm trying to include a fragment such as below (from stackoverflow). Is there another way to do this with vue-meta, or should I look for another solution, while waiting on this branch? (My intention is to not support IE -- and explicitly navigate users somewhere else to tell them it isn't supported.)
<!-- For IE <= 9 --> <!--[if IE]> <script type="text/javascript"> window.location = "https://google.com"; </script> <![endif]--> <!-- For IE > 9 --> <script type="text/javascript"> if (window.navigator.msPointerEnabled) { window.location = "https://google.com"; } </script>
You can detect IE in other ways with pure JS btw.
export default {
data () {
return {
isInternetExplorer: false
}
},
beforeMount () {
this.isInternetExplorer = Boolean(document.documentMode)
}
}
The problem is that my vue code doesn't run on IE. Perhaps if I were to dumb down the javascript dialect and/or fiddle with babel it would work, but I'd prefer just to redirect. Should be simple(?)
@shaunc Are you using Nuxt.js? Then you could include this static piece of code in your app template
If you are not using Nuxt then you will probably still have a similar app template file that you use with ssr, so you should be able to apply the same fix. Look up the docs of the framework you are using.
Ah -- cool; I am using Nuxt. I overlooked the "app template" setting. Thank you!
People using Nuxt can always use a custom AppView (HTML file) anyway.
@manniL Do you mean we can use a custom HTML file as the template (like the public/index.html
in vue-cli)? If yes, how?
@manniL Oh I just found the doc: https://nuxtjs.org/guide/views/#app-template
Sometimes need to add the code below for ie browser.
It can be added like this.
I tried to make on my branch to make pull-request but, I got some dependency errors.