Issue: 3096

How do I add a listener event on the server side?

[issue link]

I need to add a listening keyboard event to the page, but now I’m using nuxt to add the listener failure.


    const _this = this;
    _this.hotelMarquee = this.hotel[this.language_code].length>18;
    document.onkeydown = function(e) {

The results of the operation are wrongly reported as follows:

[Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render.

This question is available on Nuxt.js community (#c2680)