Title: Provide a way to access script document information from host methods · Issue #682 · ClearFoundry/ClearScript · GitHub
Open Graph Title: Provide a way to access script document information from host methods · Issue #682 · ClearFoundry/ClearScript
X Title: Provide a way to access script document information from host methods · Issue #682 · ClearFoundry/ClearScript
Description: Discussed in #667 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 plu...
Open Graph Description: Discussed in #667 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 work...
X Description: Discussed in #667 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 work...
Opengraph URL: https://github.com/ClearFoundry/ClearScript/issues/682
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Provide a way to access script document information from host methods","articleBody":"\n### Discussed in https://github.com/microsoft/ClearScript/discussions/667\n\n\u003cdiv type='discussions-op-text'\u003e\n\n\u003csup\u003eOriginally posted by **cyraid** July 26, 2025\u003c/sup\u003e\nIn 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).\r\n\r\nIt would be nice if something like this existed:\r\n\r\n```csharp\r\npublic static class SomeClass {\r\n [ScriptMember(\"someMethod\")]\r\n public static void SomeMethod(V8DataOfSomeSort v8Data) {\r\n // v8Data.CurrentDocument.HostData\r\n } // Procedure //\r\n} // Class //\r\n\r\n//...\r\n\r\nengine.AddHostType(typeof(SomeClass));\r\n\r\n// Execute engine Module stuff here, then tie in a \"HostData\" (the plugin instance) to the Module on the C# side.\r\n```\r\n\r\nIn Javascript (let's say were are in a Module):\r\n\r\n```javascript\r\nSomeClass.someMethod();\r\n```\r\n\r\nI 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.\u003c/div\u003e","author":{"url":"https://github.com/ClearScriptLib","@type":"Person","name":"ClearScriptLib"},"datePublished":"2025-10-08T17:09:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/682/ClearScript/issues/682"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c24c59d7-6c74-9db2-1152-658953400a8f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B856:251287:1CEDEB:28374E:696FCFC3 |
| html-safe-nonce | 0cb8a88ad5d5f5b332676df7f68b82c7ed8fa92c0519ae4290add78c9245edf1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODU2OjI1MTI4NzoxQ0VERUI6MjgzNzRFOjY5NkZDRkMzIiwidmlzaXRvcl9pZCI6IjYyMjY4NjIxODkwMTMwOTQzMzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 79909e140790994597d6bf59691c0552c8d5d212ecc7dfd58a008718003ca4a0 |
| hovercard-subject-tag | issue:3496239964 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ClearFoundry/ClearScript/682/issue_layout |
| twitter:image | https://opengraph.githubassets.com/abc57f85216c12c08d27f40e5aaf7286f7c33170d47d5caa5586024c8b8bdf9a/ClearFoundry/ClearScript/issues/682 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/abc57f85216c12c08d27f40e5aaf7286f7c33170d47d5caa5586024c8b8bdf9a/ClearFoundry/ClearScript/issues/682 |
| og:image:alt | Discussed in #667 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 work... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ClearScriptLib |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a44b41159f8508d767a50a41d4355b6e6607de801262664cbe75414886e44e9 |
| turbo-cache-control | no-preview |
| go-import | github.com/ClearFoundry/ClearScript git https://github.com/ClearFoundry/ClearScript.git |
| octolytics-dimension-user_id | 232231756 |
| octolytics-dimension-user_login | ClearFoundry |
| octolytics-dimension-repository_id | 90258367 |
| octolytics-dimension-repository_nwo | ClearFoundry/ClearScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 90258367 |
| octolytics-dimension-repository_network_root_nwo | ClearFoundry/ClearScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 347f3ebfaef84b36b267c7a20bade84594f267d5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width