Home

Issue: 1154

'loaded' event on client side

[issue link]

Hi,
I’m wondering if Nuxt.js provides the ability to notify the client that Nuxt has setup properly.
The equivalent to to jQuery might be

$( document ).ready()

The use case is that I may have some code depending on window.$Nuxt, and a in-house mechanism for detect if it’s ready would be great, for example, a simple event would do:

var e = new CustomEvent('nuxt-loaded')
window. dispatchEvent(e)
This question is available on Nuxt.js community (#c1013)