You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide a way to access script document information from host methods #682
Originally posted by cyraid July 26, 2025
In a C# method, calling from Javascript, is there a way to get Module (Document) information? I have a Javascript Plugin System that works off of a single V8 Engine (so that plugins can import Modules from other plugins).
It would be nice if something like this existed:
publicstaticclassSomeClass{[ScriptMember("someMethod")]publicstaticvoidSomeMethod(V8DataOfSomeSortv8Data){// v8Data.CurrentDocument.HostData}// Procedure //}// Class ////...engine.AddHostType(typeof(SomeClass));// Execute engine Module stuff here, then tie in a "HostData" (the plugin instance) to the Module on the C# side.
In Javascript (let's say were are in a Module):
SomeClass.someMethod();
I have a logging system, and it would be nice having which plugin the debug information is coming from when it outputs to the logging view.
Activity