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
Can I access DOM object by vugu's method instead of syscall/js package ? #65
Comments
This is still being worked on. See comment #49 (comment) . Look out for an update on this soon and I'll definitely be sure to clearly document what this mechanism is as soon as it is ready. |
Thanks for hard working . |
I have tested multi-component structure(root/child/child of child in 3 vugu files) . It worked perfectly on passsing/relaying parameters from root component . Sorry for disturbing your busy developing .Good job . |
That's great! Yeah the event work is still ongoing but getting much closer now. Still a couple weeks out from merging into master though. But soon. |
I'm not sure how much this solves what you're referring to above, but have a look at: https://github.com/vugu/vugu/wiki/Refactor-Notes---Sep-2019#new-and-improved-dom-event-handling It doesn't give you access to the raw DOM element, but it does give you data about it collected in JS and made available to you in Go. |
For accessing the DOM, there are at least these 2 projects: https://github.com/dennwc/dom |
Thanks for your information . |
What would be really helpful is if someone could describe what syntax/features would be useful as a developer to implement. You can access the DOM from a Vugu program using the syscall/js package very easily, but Vugu modifies that DOM during render - so it is not safe to keep references to DOM elements in your code. An example that shows how you would expect to use DOM access would allow us to discuss the pros and cons thereof. |
That's right . I think accessing DOM by vugu's interface would be safe and enough now. |
A new feature has been added for this. You can now get a js.Value for an element when it is rendered (this can be used for example to draw into a canvas). See https://www.vugu.org/doc/files/markup#vg-js-create |
good job . thanks for your hard working these days . |
I have read this post : #49 . That post was closed .
Any new progress or plan about accessing DOM object by vugu's local/native method instead of invoking syscall/js package ? For example , fetch values from text or selection box element ( in root.vugu file) and invoke some APIs according to values of these input or selection box .
Thanks .
The text was updated successfully, but these errors were encountered: