I'm using this component to render Vue components within HTML that is uses RevealJS to create a slideshow out of it. Unfortunately, RevealJS can only be initialized after the component has rendered into the DOM, and there's no event to hook into for that (at least that I could find).
So, this adds a prop called ready, which takes a callback function. When the dynamic component's loaded lifecycle event occurs, this callback function is fired, allowing the parent control to interact with the rendered DOM.
(I tried to make this an event first, but couldn't quite figure that one out.)
I'm using this component to render Vue components within HTML that is uses RevealJS to create a slideshow out of it. Unfortunately, RevealJS can only be initialized after the component has rendered into the DOM, and there's no event to hook into for that (at least that I could find).
So, this adds a prop called
ready
, which takes a callback function. When the dynamic component'sloaded
lifecycle event occurs, this callback function is fired, allowing the parent control to interact with the rendered DOM.(I tried to make this an event first, but couldn't quite figure that one out.)