문제

as you know can use the follow code create a new Array Object.

var a = new Array();

now i implement a IDispatch interface for IWebBrowser,i can pass a Object to javascript,but how to handler create a custom Object like follow code,the CustomObject is undefined Object type.

var a = new CustomObject();
도움이 되었습니까?

해결책

You can create a constructor function just like a normal function then use it as a custom type

function CustomObject(){
    //do what ever
}

then

var a = new CustomObject();

Also read this doc

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top