开发者

Can JavaScript Librarys and programming languages work together?

开发者 https://www.devze.com 2023-01-23 10:19 出处:网络
Well, can they? Like jQuery using a fadeI开发者_如何学运维n function for something on a C++ app, can it work?I think you are confused about what runs where.

Well, can they? Like jQuery using a fadeI开发者_如何学运维n function for something on a C++ app, can it work?


I think you are confused about what runs where.

jQuery usually requires a browser with a Document Object Model to run.

While this is something a C++ application could probably, theoretically, provide somehow, it's not really practical.

You want to investigate UI and effects libraries native to C++ rather than JavaScript libraries.

What do you want do achieve and most importantly, on what platform?


It would require your C++ app to contain both a JavaScript interpreter and a HTML DOM (because that's what jQuery operates on to do things like fadein effects).

Such C++ apps exist - they're called web-browsers. I suppose you could embed an open source web engine like Webkit in your app, but at that point you'd basically be developing a webapp and might as well drop the C++ part altogether.


If your C++ application use WebBrowser control for example to display a web page which use jQuery.fadeIn then you can "combine" both technologies.

Nevertheless I would more see that jQuery.fadeIn will work parallel to your main application and they will not work really together.

0

精彩评论

暂无评论...
验证码 换一张
取 消