Replies: 10 comments 4 replies
-
While I'm at it, I may just as well add support for both, if I succeed with one. |
Beta Was this translation helpful? Give feedback.
-
Hmmm, seems the documentation in the links does not appear to be current, so apparently not official documentation. There is not a |
Beta Was this translation helpful? Give feedback.
-
Hey. Nice "little" project. :) More than happy to accept patches, but having spent six months just getting the freaking auto-update workflow working smoothly, I'm a bit exhausted. :) |
Beta Was this translation helpful? Give feedback.
-
https://v8.github.io/api/head/ is the official documentation, linked from https://v8.dev/docs/api, so that's probably the best source, indeed. I found the |
Beta Was this translation helpful? Give feedback.
-
Btw, I'm encountering a few more unsupported but necessary features, e.g Btw, if you want to check out the have work in a branch And now I think I need a As I understand, the object needs to be pinned by a |
Beta Was this translation helpful? Give feedback.
-
I don't have much to add, but Pinner is pretty new. The 1.21 release notes point to https://pkg.go.dev/cmd/cgo#hdr-Passing_pointers for additional information. |
Beta Was this translation helpful? Give feedback.
-
btw, do you have any relation with, acquaintance, or had communication with @rogchap , who as I understand, wrote the majority of the code? |
Beta Was this translation helpful? Give feedback.
-
Not other than PRs. Not all were accepted. It seems abandoned, even though there are several users with commit rights. See the links in the top of the README for my attempts to reach out. I'd be more than happy for them to take my PRs and build workflows, but don't have high hopes ATM. |
Beta Was this translation helpful? Give feedback.
-
Hi again. I tried to reach out to rogchap, but haven't heard back. Mostly from the intent of getting code feedback, or ask about some things I think look a little odd, or things I believe could be simplified. Anyway, I've added quite a bit of functionality; but I haven't made any PRs yet, as the code is somewhat hacked, and I haven't written test for any of it. The code is only tested through my other project. I'm mostly mentioning this, if you also are in the situation that you need any of this functionality, there's no reason to add it twice. Or if in other ways, you need to extend the functionality; it would be nice at least to share experiences. I think this is a complete list of extensions I've made (checking git log messages):
I am currently working on tapping into But I also see some other issues I intend to address. Callback handling, e.g. native functions, property handlers, etc. Handling function callbacks does come with quite a bit of code; and to handle all features of both named and indexed property handlers, I think that will be 10 new kinds of callback; i.e., callback types with different signatures. Then you have console message callback, and weak handle callbacks (when a v8 value is garbage collected) I don't want to duplicate all the current callback handling code 10 times, so I'll probably look into how to simplify callback handling Memory Management It seems all While the object exposes a function to release the object, I think there are many objects that are held for too long. |
Beta Was this translation helpful? Give feedback.
-
You seem to have been busy. :) Good to hear about your progress.
The template functions do sound useful.
Yeah, that doesn't sound pleasant.
Yes, having to release values manually isn't very nice. Actually, weak pointers just landed in Go, so perhaps there's a way forward there: https://go-review.googlesource.com/c/go/+/628455 |
Beta Was this translation helpful? Give feedback.
-
I had the crazy idea to build a headless browser in Go, so I need a JavaScript engine.
The DOM itself would be implemented as Go objects, and therefore, I need to expose those as JavaScript objects, which is apparently what the ObjectTemplate is meant for (based on about 5 minutes of research)
Unfortunately, the crucial parts for, setting accessors or interceptors is not implemented yet. At least as far as I can tell.
I intend to work on these in a new fork. It appears that the groundwork is done, so adding this functionality shouldn't be too hard.
Unless work has commenced already on these features?
This seems to be the most up-to-date fork of the original project, which is why I use this as my starting point.
Beta Was this translation helpful? Give feedback.
All reactions