Read the statement by Michael Teeuw here.
Dynamically update html
-
Hi,
I have created a departure board for public transportation, including real time updates to departure time within the module. The board is updated every 20s, by passing notifications from node_helper that updates the DOM thru getDom function. Challange is that i have a marquee element within my HTML that i dont would like to be reset every 20s, instead i would like that HTML element to be kind of static within the module.
Is there any possibility of not refreshing the complete HTML, like using “updateDom” instead of “getDom” so that my marquee element is not reset?
BR
-
I resolved it by implementing a updateBoard function that checks if tables has been rendered and if just updates the innerHTML of that div. Was great to read ANOTHER WAY TO CONTROL OUTPUT in the beginners KB, https://forum.magicmirror.builders/topic/8534/head-first-developing-mm-module-for-extreme-beginners
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