Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is addHotpoint() asynchronous? #61

Open
jshenguru opened this issue Mar 24, 2023 · 2 comments
Open

is addHotpoint() asynchronous? #61

jshenguru opened this issue Mar 24, 2023 · 2 comments

Comments

@jshenguru
Copy link

jshenguru commented Mar 24, 2023

The document.getElementByID() gets nothing right after the viewer.addHotpoint(). Calling document.getElementByID() 10 seconds after the viewer.addHotpoint() will get the DOM object. Is there an event I can wait to run the document.getElementByID() ? Also, it does not get me the HTMLElement, it returns Node.

@Lisp1012
Copy link
Collaborator

The document.getElementByID() gets nothing right after the viewer.addHotpoint(). Calling document.getElementByID() 10 seconds after the viewer.addHotpoint() will get the DOM object. Is there an event I can wait to run the document.getElementByID() ? Also, it does not get me the HTMLElement, it returns Node.

Yes, you need to get it in the next frame, maybe we'll provide a callback later

@yanzexuan1
Copy link
Collaborator

@Lisp1012 , How is this issue going on? Is it fixed already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants