Unable to DOM select based on ID #4077
-
I have the following Layout class
Here please note there is a Digits Widget with ID: "header" Now, in my own custom class, I tried this
But I am getting the error
How to I get a DOM element outside the layout class, and how do I update it dynamically (say based on input from a web socket) |
Beta Was this translation helpful? Give feedback.
Answered by
davep
Jan 30, 2024
Replies: 1 comment 4 replies
-
You're doing the query in |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks like you searched for and read about the
mount
method; I actually linked you to theMount
event, which is a different thing altogether.More generally though, looking at what you're trying to do, I think you might be unclear about how a Textual application works. By the time the
run
method of your app has completed the application has finished running.I'm starting to suspect that your question has nothing to do with how to query the DOM and you're looking for advice on how to handle c…