Skip to content

Conversation

brycepj
Copy link

@brycepj brycepj commented Dec 20, 2016

Where I work, it's not uncommon to come across <script> tags in templates that would not be trivial to move into separate files. If Vue will prevent the execution of the contents of these tags, I think the warning should say so. As it is, it reads more like a recommendation than a requirement:

Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <script>.

I don't know if the language I've added is best, but it's an example of text that tells the user they should not expect their code to run. Feel free to edit as desired.

@yyx990803 yyx990803 merged commit fd55399 into vuejs:dev Dec 21, 2016
@yann-yinn
Copy link

Is that why i can not embed gists in my blog posts ? A gists is embedded with
<script src="https://gist.github.com/nyl-auster/445b557a17197e3c6771af5c0554e439" />
For now i have to put simple links instead of embedding code in my site : https://yineo.fr/blog/animer-vos-transitions-de-page-facilement-avec-nuxt-js-et-vue-js

Is there a wordaround for this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants