onParsed listener?
Closed this issue · 4 comments
Is there any listener to be triggered if the CSS finished the parsing process?
every "onReady" API aims to tell the developer that something is ready to use ..
But as the DSS API is always available to use since it is included, I didn't implemented an event like that.
Could you show me a use case for it?
Is for prevent the user see the page mounting.
I already have a loading spinner for that. I just need to know when the DSS ends the process (Ajax Request of the CSS + Parsing) to hide the loading spinner.
I use the event "DOMSubtreeModified" to check if the "dss-generated-stylesheet" was created, but I think this is a ugly solution...
Do you have some idea for this?
@gabrielbiga
193dddf
Now we have an pub/sub based events engine =D
We came with 2 events out of the box and here it is :
init
dss.on('init',function(){
console.log('DSS initialized with its first render Cycle =D ')
})
render
dss.on('render',function(){
console.log('there is a render cycle =D')
})
Thanks for your time and attention ! ❤️ ❤️ ❤️
issue closed for a while =D
YEAAAH! tks @guisouza! 👍