Skip to content

Need to pass parameters to instance after AddHostType() instance creation is created #658

@commonsuppliz

Description

@commonsuppliz

I have a custom MyXMLHttpReuest class in C#, and it is defined method as follows


  v8Scope.AddHostType("XMLHttpRequest", typeof(MyXMLHttpRequest));

When ClearScript V8 calles , instanse creation is success.
My problem is that I need some addtional parateters (like base url, window object etc) to this "xhr" instance. I can not modify javascript to call addtional functions to solve this problem.

const xhr = new XMLHttpRequest(); console.log("XHR instance created...");

Is there any work around for this?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions