Read the statement by Michael Teeuw here.
Catching the DOM content is updated
-
Is there any good practice for catching the moment
updateDom()finishing? Or the moment of contents that are created bygetDom()are rendered on the screen?
I have to do some job after rendering, but hard to measure or guarantee when it finishes.... this.updateDom(options) this.doSomethingWithRenderedDom() ...- The module
thisitself is not the only module that can call.updateDom() .updateDom()is not promise-able or doesn’t have a callback function to notify rendering finished..getDom()is promise-able, but not consumable by the module itself.- in
.getDom(), the contents are not rendered yet, so I cannot do certain job at that moment. - The only way I can do is using
MutationObserver, but that is not convenient.
What I need might be
module.domUpdated(). orawait module.updateDom()ormodule.updateDom(options, callback). orDOM_UPDATEDnotification.Or… Is there any better way to achieve this?
- The module
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login