Vue: Why was "Vue.config.prefix" removed?

Created on 29 Feb 2016  Â·  3Comments  Â·  Source: vuejs/vue

Hi,
Is there a reason why was "Vue.config.prefix" removed? Performance issues?
In order to have our html W3C compliant, we could set it like this:
Vue.config.prefix = "data-v";
Or do you have a nice way to make it work?
Maybe using a jQuery selector that would change all "data-v-" by "v-" in the init event?
Any ideas?
Thanks

All 3 comments

You could probably do so during the "beforeCompile" event, which is fired just before the element goes through Vue's compilation.

Vue directives are removed in the rendered markup, so your eventual markup will be W3C compliant.

This tips for « v- » is not anymore relevant « https://github.com/vuejs/vue/issues/221 » for Windows phone and what yyx990803 said here « https://github.com/vuejs/vue/issues/273#issuecomment-43408252 » is not relevant anymore too...

So, how I could use « data-v-* » instruction to keep « source » from server W3C Compliant in order to pass this tests for example : https://validator.w3.org/ ?

EDIT : I just thinking if this « v-bind:class » syntax become « data-v-bind:class » that will not change the validation failure so... maybe « osef ».

Was this page helpful?
0 / 5 - 0 ratings