简体   繁体   中英

Can JavaScript Librarys and programming languages work together?

Well, can they? Like jQuery using a fadeIn 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM