title: Add event listeners in VueJS 2
body: <p>I am trying to add event listeners to my viewmodel once VueJS is loaded.  Adding event listeners works if I do not use VueJS, so I know the code is correct but they never attach in VueJS.</p>
  <pre class="lang-html prettyprint-override"><code>&lt;div id=&quot;app&quot;&gt;
    &lt;div name=&quot;pageContent&quot; id=&quot;preview&quot;&gt;
      &lt;section class=&quot;row&quot;&gt;
        &lt;div class=&quot;columns medium-12&quot;&gt;
          &lt;h1&gt;This is the top content&lt;/h1&gt;
          &lt;p&gt;ashcbaubvdiuavduabd&lt;/p&gt;
        &lt;/div&gt;
      &lt;/section&gt;
      &lt;section class=&quot;row&quot;&gt;
        &lt;div class=&quot;columns medium-6&quot;&gt;
          &lt;h1&gt;This is left content&lt;/h1&gt;
          &lt;p&gt;ashcbaubvdiuavduabd&lt;/p&gt;
        &lt;/div&gt;
        &lt;div class=&quot;columns medium-6&quot;&gt;
          &lt;h1&gt;This is the right content&lt;/h1&gt;
          &lt;p&gt;ashcbaubvdiuavduabd&lt;/p&gt;
        &lt;/div&gt;
      &lt;/section&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;script type=&quot;text/javascript&quot;&gt;
    let editorContainer = document.getElementById('preview')
    let controls = document.getElementById('defaultControls')
    let cmsEditor = new CmsEditor(editorContainer, controls)
    var app = new Vue({
      el: '#app',
      data: {
        editor: cmsEditor
      },
      mounted: function () {
        // wire up our listeners
        console.log('mounted')
        document.oncontextmenu = function () { return false }
        let rows = this.editor.EditorContainer.getElementsByTagName('section')
        for (var i = 0; i &lt; rows.length; i++) {
          console.log('section ' + i + ' : ' + rows[i].innerHTML)
          rows[i].addEventListener('mouseover', function () {
            console.log('mouse over event')
            this.editor.SetActiveRow(this)
          })
          rows[i].addEventListener('dblclick', function () {
            this.editor.DisplayContextMenu(this)
          })
        }
      },
      methods: {
        save: function () {
          console.log('save')
          this.editor.Save()
        },
        undo: function () {
          console.log('undo')
          this.editor.Undo()
        }
      }
    })
  &lt;/script&gt;
  </code></pre>