Skip to content

Instantly share code, notes, and snippets.

@neves
Last active June 5, 2017 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neves/4f5a9af1a162643f63d3a7c87d7b9c3c to your computer and use it in GitHub Desktop.
Save neves/4f5a9af1a162643f63d3a7c87d7b9c3c to your computer and use it in GitHub Desktop.
Vue.$log
Vue.prototype.$log = console.log.bind(console)
new Vue({el: '#app'})
<div id="app">
<input @keydown="$log" @keyup="$log" @keypress="$log" placeholder="type here">
open console to see the logs
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment